-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: not-null property references a null or transient value
PostPosted: Tue Jul 08, 2008 1:41 pm 
Newbie

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 5:43 pm 
Newbie

Joined: Tue Jul 08, 2008 12:38 pm
Posts: 2
thanks for reading .I found the problem in the transactionid column
insert="false" updte="false"


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 11:01 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Thanks for the update! It will help other people with the same problem.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.