-->
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: DataIntegrityViolationException with inheritance.joined
PostPosted: Mon May 25, 2009 9:21 am 
Newbie

Joined: Thu Aug 14, 2008 2:22 am
Posts: 11
hello,
i get a DataIntegrityViolationException and i don't know why. my class p is the subclass of s. every attribut is set.

Code:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class S
{
..
}


Code:
@Entity
public class P extends S
{...
}


Code:
final P p = new P();
p.setA();
..
getSession().save(p);


error:
DataIntegrityViolationException: not-null property references a null or transient value: P._sBackref

has anybody an idea whats going wrong?
thanks very much in advance.


Top
 Profile  
 
 Post subject: Re: DataIntegrityViolationException with inheritance.joined
PostPosted: Thu May 28, 2009 11:49 am 
Regular
Regular

Joined: Tue Feb 17, 2009 5:13 am
Posts: 59
Hi.

I would need a little more information to examine the problem.
Can you show the complete mapping code? I mean fields (getters/setters/ with Hibernate annotations and its parameters.

Where is the id?

What is the semantics of invocation p.setA().

_________________
Born to lose... live to win!


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.