• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate 2: net.sf.hibernate.PropertyValueException: not-null property references a null or transie  RSS feed

 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
when I try to delete a persistent object I get:
net.sf.hibernate.PropertyValueException: not-null property references a null or transient value

what does it mean?

Thanks,
John
 
Andreas Erber
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John Landon,

to make a guess - you are trying to delete an object that is referenced by (a.k.a. associated with) some other object. The other object has the first object as a property value that may not be null, I suppose.

CU
Froestel
 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andreas Erber wrote:Hi John Landon,

to make a guess - you are trying to delete an object that is referenced by (a.k.a. associated with) some other object. The other object has the first object as a property value that may not be null, I suppose.

CU
Froestel

Ohhh your guess might be bingo. I will check. Thank you!
 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andreas Erber wrote:Hi John Landon,

to make a guess - you are trying to delete an object that is referenced by (a.k.a. associated with) some other object. The other object has the first object as a property value that may not be null, I suppose.

CU
Froestel


Actually no. So the full thing says :

Yes fieldA is an of type ClassB. What you are saying I am trying to delete ClassB that is referenced by classA but the opposite is true.
Any other ideas?
Thanks.
 
Andreas Erber
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John Landon,

ok, I try a second time... hm, what about cascading? Could there be conflicts when cascading your delete to associations? Probably over several stages?

CU
Froestel
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!