Thank you for such a quick reply! I thought I might have to do
something like that. Could you explain, though, for my own
understanding, why the exception isn't raised the first time a
Lesson is referenced through a backref? It's missing required fields
at that point, so one would expect this
rledley wrote:
Thank you for such a quick reply! I thought I might have to do
something like that. Could you explain, though, for my own
understanding, why the exception isn't raised the first time a
Lesson is referenced through a backref? It's missing required fields
at that point, so one
you can disable autoflush temporarily (session.autoflush=False), turn
off save-update cascade on the collection relations so that you add
the Lesson manually, or instantiate Lesson using the backrefs to set
it up, i.e. Lesson(obj1=someobject, obj2=someotherobject), so that
upon construction the
or you can use lazy=dynamc on those collections so that they only
load when iterated.
On Jul 10, 2009, at 9:14 PM, Michael Bayer wrote:
you can disable autoflush temporarily (session.autoflush=False), turn
off save-update cascade on the collection relations so that you add
the Lesson