Conor wrote:
> I cannot speak to how feasible it is to add this feature to a relation,
> but if it is added then it would likely be built on top of query options
> since there is so much overlap. I think your multiple definition
> approach is possible, but it is not something I would want to attempt.

I'd like to add that the most flexible way of all to get any information
you like from an object attribute is to just use a query() from scratch,
acquired via object_session(self).   You're already asking for read-only
information, therefore you don't need the peristence side of relation(),
and as far as loading everything "eagerly" via join that can still be
accomplished just using a join() + extra cols in query() if you really
needed it.

for reference the general idea of entirely custom properties is at:
http://www.sqlalchemy.org/docs/05/mappers.html#building-query-enabled-properties




--

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