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
|