[sqlalchemy] Re: association obj/proxy

2007-04-06 Thread svilen
seems this is the month of the many2many relations ;-) more on the theme: many2many i have a association of 3 tables, A,B,C. one of them (C) may not be present in all assoc_items. So that column has nullable=True. The problem is: adding associations to A-objects and saving them works; but

[sqlalchemy] Re: association obj/proxy

2007-04-06 Thread Michael Bayer
On Apr 6, 2007, at 5:39 AM, svilen wrote: seems this is the month of the many2many relations ;-) more on the theme: many2many i have a association of 3 tables, A,B,C. one of them (C) may not be present in all assoc_items. So that column has nullable=True. The problem is: adding

[sqlalchemy] Re: association obj/proxy

2007-04-06 Thread sdobrev
seems this is the month of the many2many relations ;-) more on the theme: many2many i have a association of 3 tables, A,B,C. one of them (C) may not be present in all assoc_items. So that column has nullable=True. when you say, association of 3 tables, A,B, C, do you mean, there

[sqlalchemy] Re: association obj/proxy

2007-04-06 Thread Michael Bayer
On Apr 6, 2007, at 8:19 PM, [EMAIL PROTECTED] wrote: btw whats the reasoning/rational behind the above default behaviour? i think it is often unexpected behavior, particularly for a query that returns rows between say table A and table B, where some of the rows contain nulls for the B

[sqlalchemy] Re: association obj/proxy

2007-04-05 Thread svilen
here's what i did and it seems to work: class _Empty: pass class Base4Association(..):#the base for assoc_objects ... class MyCollection( list): factory = None def append( me, obj =_Empty, **kwargs): if obj is _Empty:#marker for notset; else just use