On Oct 1, 2007, at 9:22 PM, Dan Eloff wrote:

>
> On 10/1/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>>
>> most likely too many association rows are present in the m2m table.
>>
>
> Do you mean there were redundant associations? How can I check if
> that's the cause of the problem?
>

the stack trace for the error would originate from sqlalchemy's file  
'dependency.py' around line 379.   if the m2m table contains  
multiple, duplicate rows, this problem would occur.  placing a unique  
index on the table (or making both columns of the association table a  
composite primary key) would prevent the dupe rows from being  
inserted in the first place.

as to the reason the rows may have been inserted in that way, id look  
at standalone INSERT statements which may be affecting it, as well as  
redundant mappings against the association table, such as a mapper()  
defined on it at the same time the table is used as the "secondary"  
argument elsewhere.

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