Re: [sqlalchemy] defining a relationship with "IS NOT"

2014-04-15 Thread Jonathan Vanasco
i'll try this later. i ended up 'monkeypatching' all these relationships onto the classes at the end of my models.py file , using the non-string column syntax. would have preferred to keep the entire class definition, together.. but I documented everything. -- You received this message bec

Re: [sqlalchemy] defining a relationship with "IS NOT"

2014-04-15 Thread Richard Gerd Kuesters
yeah, that's why I shared this :) good to know, i'll use that from now on ;) my best regards, richard. On 04/15/2014 09:32 AM, Wichert Akkerman wrote: On 15 Apr 2014, at 13:25, Richard Gerd Kuesters mailto:rich...@humantech.com.br>> wrote: interesting, i didn't knew that :D i was using s

Re: [sqlalchemy] defining a relationship with "IS NOT"

2014-04-15 Thread Wichert Akkerman
On 15 Apr 2014, at 13:25, Richard Gerd Kuesters wrote: > interesting, i didn't knew that :D > > i was using shomething like (for softwares such as st2, which has pep8 > checking): > > ## variables > > NULL = None # f**k pep-8 > TRUE = True # f**k pep-8 > FALSE = False # f**k pep-8 You c

Re: [sqlalchemy] defining a relationship with "IS NOT"

2014-04-15 Thread Richard Gerd Kuesters
interesting, i didn't knew that :D i was using shomething like (for softwares such as st2, which has pep8 checking): ## variables NULL = None # f**k pep-8 TRUE = True # f**k pep-8 FALSE = False # f**k pep-8 so, "somecol != NULL" is not acused as violating pep8, lol. well, just for fun :)

Re: [sqlalchemy] defining a relationship with "IS NOT"

2014-04-14 Thread Michael Bayer
there's an isnot() operator, use that On Apr 14, 2014, at 7:17 PM, Jonathan Vanasco wrote: > I'm on postgres and have a boolean column that allows NULL values. > > I need to create a relationship between 2 ORM classes , where there is a > filter that states "IS NOT TRUE". > > The ORM likes

[sqlalchemy] defining a relationship with "IS NOT"

2014-04-14 Thread Jonathan Vanasco
I'm on postgres and have a boolean column that allows NULL values. I need to create a relationship between 2 ORM classes , where there is a filter that states "IS NOT TRUE". The ORM likes these 2 commands : photo = sa.orm.relationship("Photo", primaryjoin="and_( Useraccount.photo_id==Phot