openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heather Sterling <hst...@us.ibm.com>
Subject random insertion order for inherited classes
Date Fri, 30 Jan 2009 18:23:14 GMT


Hi,

I am experiencing some weird behavior regarding the insertion order for
inherited classes.  I am using the join table strategy and some of the time
it inserts the superclass first, while other times it inserts the subclass
first (thus resulting in an exception).  It's completely random, with the
correct sequence happening maybe 25% of the time.

Any ideas?

Here's the gist of my classes......

Superclass:

@Entity(name="ManagedElement")
@Inheritance(strategy=InheritanceType.JOINED)
@Table(name = "DCM_OBJECT")
public abstract class JPAManagedElement extends JPABaseClass implements
Serializable {

      @Id
    @GeneratedValue
    @Column(name="id", nullable = false)
      long id;


Subclass:


@Entity(name="SoftwareModule")
@Table(name="SOFTWARE_MODULE")
@PrimaryKeyJoinColumn(name="MODULE_ID", referencedColumnName="id")
@EntityListeners({ JPAGuidGenerator.class })
public class JPASoftwareModule extends JPAManagedElement implements
Serializable {


Heather Sterling
Systems Management Development
Phone:  919-254-7163 T/L: 444-7163
Cell: 919-423-3143
Email: hsterl@us.ibm.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message