On Nov 14, 2008, at 11:22 AM, [EMAIL PROTECTED] wrote:

>
> isn't it going to be usable if
> klas.some2many_relation == obj
> is automaticaly rendered as
> klas.some2many_relation.contains( obj)
> ?
> unless the == in that case has some other meaning...

we took that case out, its behavior was ambiguous and not really  
correct from any relational standpoint.

(btw whats "sometomany" ?   "manytomany" not sufficient ? its hard to  
parse these emails sometimes...)


> i'm using some query-building-functions over mixture of plain
> references and many2many and switching between the syntaxes depending
> on the attr is somewhat guesswork.

In the face of ambiguity, refuse the temptation to guess.


> btw same goes for
> klas.some2many_relation.has( ... ) into .any()

if you really have to work this way, Class.attrname.property.direction  
will be any of ONETOMANY, MANYTOONE, MANYTOMANY

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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