the exception you describe is not raised at mapping time, it's raised
at collection assignment time, which would indicate the relationship
you are attempting to assign towards was not defined with
collection_class=set.  Please provide complete detail including full
MCVE and complete stack trace, thanks!
On Fri, Sep 28, 2018 at 9:04 AM Mike Bayer <clas...@zzzcomputing.com> wrote:
>
> Is that the "set" python built-in?  Is it possible the word "set" was 
> redefined ?   Because that is the correct usage and it does not raise that 
> error for the "set" builtin
>
> On Fri, Sep 28, 2018, 6:55 AM <rdebr...@gmail.com> wrote:
>>
>>  I'd like to do something like:
>>
>>
>> children = relationship("Child", secondary=association_table, 
>> collection_class=set)
>>
>>
>> But I get: TypeError: Incompatible collection type: set is not list-like
>>
>> Is there a way to achieve it or set is not compatible with many-to-many 
>> relationship?
>>
>>
>>
>>
>> --
>> SQLAlchemy -
>> The Python SQL Toolkit and Object Relational Mapper
>>
>> http://www.sqlalchemy.org/
>>
>> To post example code, please provide an MCVE: Minimal, Complete, and 
>> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
>> description.
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "sqlalchemy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sqlalchemy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sqlalchemy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sqlalchemy.
>> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to