well you can create queries to look for line items, etc. just as "select" calls off of the mapper for items. is it that you want a special interface for that query to exist directly off the attribute thats on the parent item ? if you can figure out a way youd like it to look in python, im sure we could work it out. the properties attached to classes already have space for a whole bunch of special methods to be added, i.e. something like MyClass.items.select_by (x=12) .... maybe we could have that on a list instance too, i.e. myObject.items.select_by(x=12), though im not sure if i like that level of namespace pollution...

On Feb 26, 2006, at 8:49 PM, Robert Leftwich wrote:

Michael Bayer wrote:
i think i probably dont understand what you want.
    has_item = item in invoice.line_items
?

Hmm, searching was probably a bad subject choice, querying is more accurate....

I was thinking for more complex queries on children, where you want to query on multiple attributes/columns, e.g. for a particular invoice, get all the line items that are in 1 or more categories and have a quantity > 2, that sort of thing. Kind of inspired by the statement 'SQLAlchemy allows the creation of select statements from not just Table objects, but from a whole class of objects that implement the Selectable interface'. Or maybe it's closer to a dynamic version of custom join conditions.

I know it's not possible atm, but on the surface it seems a useful ability to have, but maybe that's just my warped sense of useful!

Robert


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel? cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to