jess wrote:
>
> I want to maintain some groups that change over time.  Specifically, I
> have a group table with group names and other attributes.  Every time
> an item enters a group, a record is created in an item table with an
> entry timestamp (and some other attributes).  Whenever an item leaves
> a group, its item table record is updated with an exit timestamp.  I
> need to access the group as it was at any specific time.  I cannot
> find a nice way with SQLAlchemy ORM to maintain such a Group object
> with its Item collection.
>
> The problem seems to be controlling the contents of a collection in an
> ORM object.  Using joins I can limit the returned objects to ones that
> have certain traits in the associated collection but the collection
> itself always has all the collectable objects.

this is available via contains_eager().  See the examples at
http://www.sqlalchemy.org/docs/05/mappers.html#routing-explicit-joins-statements-into-eagerly-loaded-collections
.



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