> we arent writing to anything here, this is strictly a read-only
> function.  if you want to modify the collection, you create a real
> relation() separately.  the controversy was over should the
> relation () and the generative loader be mixed (which I think they
> should not, even though its slightly more verbose...surprise).
>
> > i want to somehow bundle these (read/write aspects) in one thing,
> > e.g. called "specialized_relation", and not having to separately
> > think about intermediate objects/queries etc.
>
> yes i am not comfortable with combining them as Gaetan suggested
> since i think it conflates two semantic purposes in one attribute,
> one purpose being the management of data in the database, the other
> being a view.  in particular you really cant have your partial
> loaded list actually populate the underlying collection since it
> will only be partially populated and ruin the semantics of what it
> means to be a "relation".

Think of the "relation" in your sematics  like a class XX. The 
particular subset (for some obj on some side) - my spec_relation - is 
like an instance of that XX class. Objects in the subset belong to 
the superset by definition. Adding to the subset actualy adds to the 
general thing - assuming validation is done - or forced, e.g. if 
subsetting is by-template).
i think such pattern can be invented and wrapped in something real, 
e.g. a class, subclassing which will contain and able to 
declare/create relations, and instantiating the subclass will create 
temporary relation-subsets by some criteria.
let me see if i can do it...

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