> >> 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
> is a table "D" that contains a reference to all of A, B, C ?
>
> if thats the case, and D's reference columns to A, B, and C
> comprise a primary key, SA's default behavior when it sees a
> composite primary key of "3, 4, NULL" is to determine that the row
> does not represent an entity.  use the flag "allow_null_pks=True"
> on your mapper() to have such a primary key be counted.
yes, thanks, that's it.

btw whats the reasoning/rational behind the above default behaviour?

--~--~---------~--~----~------------~-------~--~----~
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