What I am slightly unsure about is how the viewonly flag affect the unit of work process.
If i have acquired most_recent_child through parent, and made change to it, will they be saved as part of uow process? (guess I should just do a test) Lei On Nov 7, 12:43 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Nov 6, 2007, at 8:24 PM, Esceo wrote: > > > > > Thanks Micahel, > > > What I intend to model is slightly out of convention here, > > > The child model has a reference back to the parent, and at the same > > time a reference back to the current copy of itself. > > > On the parent's end, it's only supposed to pick up the current copy, > > therefore the additional constraint. (it's not meant to be part of the > > foreign key between the parent and child) > > > Like you said, I am slightly cautious about whether it was the right > > thing to do in every case. > > well you can leave it as is and have the "inconsistent" behavior, > which is dangerous since how the object got into the session affects > the outcome, or just map an additional "most_recent_parent" or similar > relation with viewonly=True representing that particular view. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
