[jboss-user] [EJB 3.0] - [EJB 3.0] EntityBean (table) shared between EntityManger and

supradiz do-not-reply at jboss.com
Fri Jul 21 03:41:30 EDT 2006


Hello , I'am a beginner in EJB 3.

configuration:
JBOSS 4 + EJB 3.
Oracle.

procedure:
1\ I persist and object in database (Oracle) using entitymanager. (primary key generate AUTO)

2\ I add manually an object in database unsing JDBC (increment last primary key genrate by 1)

3\ I try to persist and other object in database using entitymanger but i obtain a primary key violation.

How synchronize entityManager' ID with database after adding an object manually ? (I have try Flush() but it don't work)

What is the best way to generate primary key if i use Oracle ?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959805#3959805

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959805



More information about the jboss-user mailing list