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.  [ 2 posts ] 
Author Message
 Post subject: Recursive Relationship
PostPosted: Mon Dec 17, 2007 1:13 pm 
Newbie

Joined: Thu Jun 23, 2005 12:25 pm
Posts: 7
I have a recursive relationship that I'm trying to map correctly. It seems to generate fine, but when I test the mapping by inserting a record into the table it gives me the following error.

org.hibernate.PropertyValueException: not-null property references a null or transient value: com....Track.track

The track class has a recursive relationship with itself being that it is similar to an employee where an employee can be a manager and therefore can have a parent. I set this up correctly in the database and think it is generating correctly, but when I insert a track it refers to the recursive relationship as being null or transient.

I have read through the forums and this seems to be a problem people are running into, yet they end up doing something else. If you are one of those, can you let me know what avenue you ended up taking instead of using a recursive relationship?

Any ideas on how to solve this?

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 18, 2007 12:20 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
is this a tooling question ?

apparently your model is saying track has to be not null so either you need to set it it to an entity or lift the constraint about it being not-null.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.