-
1. Re: Auto-increment / jboss 3.2.1 / Hypersonic / template no
webguy Jul 31, 2003 3:13 AM (in response to webguy)Ok here is an update. It seems you need to overwrite the defult Hypersonic settings adding the pk-template .
In addition the XML declaration for the DTD (jboss-jdbc 3.2) need to be commented out as the it doesn't include the pk entity and will cause deployment to fail, with a XML Validation error.
You can just use <entity-command name="hsqldb-fetch-key"/> in place of the longer declaration as above.. -
2. Re: Auto-increment / jboss 3.2.1 / Hypersonic / template no
brian_lind Sep 9, 2003 10:19 AM (in response to webguy)Had this problem as well. The error says exactly what it means. I had to add an <auto-increment-template>?1 IDENTITY</auto-increment-template> tag to the <type-mapping> section for Hypersonic SQL in the standardjbosscmp-jdbc.xml file. This isn't documented in the JBoss 3.2.1 Admin Devel book, so I looked at the other database type-mappings and the docs for Hypersonic SQL. You also have to make sure the "pk-constraint" attribute for your entity bean, with an auto-incrementing primary key, is set to "false" or Hypersonic will complain that you're trying to create more than one primary key when JBoss goes to auto create your database table. After that you need to add <auto-increment/> to your PK field and <entity-command name="hsqldb-fetch-key"/> to your entity bean and it should work for Hypersonic SQL. Worked for me.
By the way the MySQL type-mapping already has the auto-increment-template setup and ready to go, while the database that comes with JBoss doesn't. Sounds like an big oversite. -
3. Re: Auto-increment / jboss 3.2.1 / Hypersonic / template no
juha Sep 9, 2003 2:01 PM (in response to webguy)Please submit a patch for the hypersonic configuration for this on sourceforge: http://sourceforge.net/tracker/index.php?func=detail&aid=551165&group_id=22866&atid=376687
-- Juha