Hello: i'm trying to put together a working Seam example showing a OneToMany 
relationship using a composite primary key. Something like Order & LineItems 
from the Java EE 5 tutorial. My attempts have been unsuccessful so I'm hoping 
someone can tell me where I can find a Seam deployable example that actually 
works. 

I have tried the Java EE 5 tutorial code (\javaeetutorial5\examples\ejb\order) 
and it fails with the following (against an Oracle database):

20:56:11,991 INFO  [STDOUT] Hibernate: insert into EJB_ORDER_ORDER (status, 
lastUpdate, discount, shipmentInfo, orderId) values (?, ?, ?, ?, ?)
  | 20:56:12,084 INFO  [STDOUT] Hibernate: insert into EJB_ORDER_LINEITEM 
(ORDERID, VENDORPARTNUMBER, quantity, orderId, itemId) values (?, ?, ?, ?, ?)
  | 20:56:12,240 WARN  [JDBCExceptionReporter] SQL Error: 957, SQLState: 42000
  | 20:56:12,240 ERROR [JDBCExceptionReporter] ORA-00957: duplicate column name
  | 
  | 20:56:12,240 WARN  [JDBCExceptionReporter] SQL Error: 957, SQLState: 42000
  | 20:56:12,240 ERROR [JDBCExceptionReporter] ORA-00957: duplicate column name
  | 
  | 20:56:12,240 ERROR [AbstractFlushingEventListener] Could not synchronize 
database state with session
  | org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch 
update
  |         at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
  |         at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  |         at 
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
  |         at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)

Notice that orderId is listed twice in the second insert statement above?? The 
code is available here: 
http://java.sun.com/javaee/5/docs/tutorial/information/download.html

Please help! I really want to use Seam.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041606
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to