1 Reply Latest reply on Jan 10, 2004 12:14 PM by Klaus Kaal


    Klaus Kaal Newbie


      I am using JBoss with mySQL. I createded a CMP bean.

      Primary key is the Integer id which I configured in the DB as auto-increment.

      When I try to create a dataset, I do:

      myBean = beanHome.create( new Integer(0));

      This is, because the 0 should create an new set with the auto-incremented id field. Obviously this does not work. It throws exception and in the DB, I get a random id.

      So please, could one explain to me, how I create a dataset with that auto-key?

      Thanks for your help