Ok,

i already use session.query, no problem with my code. It works very well at
the moment.
I m just curious about advanced functionnality of my favourite orm :)

Thanks to you, i have discovered that we can :
- define associationproxy
- define a properties which returns the result of a particular queries

i will do experimentations now.

Thanks for your patience and sry for my poor english

2009/11/24 Michael Bayer <mike...@zzzcomputing.com>

> 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 sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com<sqlalchemy%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.


Reply via email to