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
-~----------~----~----~----~------~----~------~--~---

Reply via email to