Closed GoogleCodeExporter closed 8 years ago
Could you please share your code that generates the exception? As it stands
I'm
only guessing at what you're doing. Also, I fixed a few inheritance-related
bugs in
SDK 1.3.0 so please try to reproduce the exception with that. Here's some code
that
works for me:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(customStrategy = "complete-table")
public class A {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Long id;
@Persistent
@Element(dependent = "true")
List<B> bList = new ArrayList<B>();
public Long getId() {
return id;
}
public List<B> getBList() {
return bList;
}
}
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class ASub extends A {
}
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class B {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key id;
}
public void testReport() {
ASub a = new ASub();
a.bList.add(new B());
beginTxn();
pm.makePersistent(a);
commitTxn();
beginTxn();
a = pm.getObjectById(ASub.class, a.getId());
pm.deletePersistent(a);
commitTxn();
}
Original comment by max.r...@gmail.com
on 25 Dec 2009 at 3:00
Original issue reported on code.google.com by
Mark.Wue...@gmail.com
on 18 Dec 2009 at 11:39