Joined: Tue Jul 08, 2008 12:38 pm Posts: 2
|
Hi,
Thanks for taking the time to read this .Would appreciate any help in solving this problem which should be a very common mapping .
I have searched through the forums and I cant see what is wrong with my mapping .
I have two tables Orders and Items .A one to many relationship where there can be one or several items per order .
I have configured the mappings to work bidirectionally .
I have a primary key in the Orders table which is sequenced generated from the oracle database .I have the Items table which has its own primary key which is also sequence generated .There is a foreign key relationship through transaction_id .
I have bidirectional mapping in here but would be happy to get uni-directional mapping working initially .
//Exception
Exception in thread "main" org.hibernate.PropertyValueException: not-null property references a null or transient value: com.visualbuilder.hibernate.Items.TransactionId
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:270)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:128)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at com.visualbuilder.hibernate.client.RunOrdersItems.main(RunOrdersItems.java:65)
Hibernate version 3.2
Orace Version Oracle 9i
|
|