I'm getting a PersistenceException while trying to create an object that has
lazy-loaded, independent children properties that in turn have castor
lazy-loaded, independent properties. I can't imagine I'd need to walk the
entire tree loading each independent object when I do a create/update. Is the
general flow below supported? Is this a bug?
For example the following code:
db.begin();
GolfRound round = new GolfRound();
round.setCourse(db.load(GolfCourse.class, id));
round.setCourse(new Date());
db.create(round);
db.commit();
db.close();
fails with org.exolab.castor.jdo.PersistenceException: Object, [EMAIL
PROTECTED], links to another object, [EMAIL PROTECTED] that is not
loaded/updated/created in this transaction:
class GolfRound {
private Long id;
//lazy-loaded flag set to true in mapping
private GolfCourse course;
private Date datePlayed;
...
}
class GolfCourse {
private Long id;
//lazy-loaded flag set to true in mapping
private City city;
private Collection teeBoxes;
...
}
class City {
private Long id;
private String name;
...
}
Thanks,
Jon
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------