-->
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.  [ 1 post ] 
Author Message
 Post subject: inheritance mapping problem
PostPosted: Mon Nov 26, 2007 3:36 pm 
Newbie

Joined: Mon Nov 26, 2007 3:30 pm
Posts: 3
my persistent structure has one abstract parent and two children. all are @Entity, the parent is @Inheritance(strategy=InheritanceType.JOINED).

the ID is only in the abstract class and declared as follows (usnig db sequences):

@SequenceGenerator(name = "seq", sequenceName = "seq_id_oracle")
@Id
@GeneratedValue(generator = "seq")
public long getId() {
return this.Id;
}

i instanciate one of the childs (no matter which) in a @Transactional method, which returns the instanciated object's id.

the problem goes here: when transaction commits, everything is perfectly persisted in the database (both the parent part and the childs part with all ids correct), but the method returns null.

hibernate 3.2.0,
annotations 3.3.0


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

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.