[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Help! Want to auto-generate primary keys with EJB 2, CMP/MyS
do-not-reply at jboss.com
Wed Jul 16 20:32:01 EDT 2008
I'm in a project porting from Weblogic/Oracle to JBoss/MySQL. We're sticking with EJB 2's for now.
I did the Oracle -> MySQL part, and now am working on the Weblogic -> JBoss part.
In migrating to MySQL, I changed use of Oracle SEQUENCE's to separate sequence tables. Weblogic supports generation of keys from these tables.
However, it would seem that there is no built-in technique for auto-generating primary keys from specified tables in JBoss. Each primary key needs to have it's own counter (i.e. I can't generate them all from one place); I was thinking of using the 'entity-command' element, but that would require writing a class for each entity (or perhaps just one rather smart entity).
Does anyone know if JBoss 4.2.2 can do what I want?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164890#4164890
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164890
More information about the jboss-user