Re: [sqlalchemy] Is it a bad idea to avoid to use backref and back_populates ?

2017-11-09 Thread Sven
Thank you for your answers and your explanations ! :-) It is clear to me, now and I will work on that. -- 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

Re: [sqlalchemy] Is it a bad idea to avoid to use backref and back_populates ?

2017-11-08 Thread Mike Bayer
On Wed, Nov 8, 2017 at 1:58 PM, Sven wrote: > What do you mean by "deduplication" ? it means if you have a collection : [a, b] and you try to add "a" again: collection.append(a) you get: [a, b] that is, "append" is idempotent given a particular object identity. >

Re: [sqlalchemy] Is it a bad idea to avoid to use backref and back_populates ?

2017-11-08 Thread Sven
What do you mean by "deduplication" ? I have certainly just a few exotic different type of collection. The others are standard (lists, dictionaries, ordereddict, etc), but I don't understand why you are asking that :p Are you asking that because you think that the solution would be to always

Re: [sqlalchemy] Is it a bad idea to avoid to use backref and back_populates ?

2017-11-08 Thread Mike Bayer
On Nov 8, 2017 1:09 PM, "Sven" wrote: Thank you for your answer. It is always very complete and interesting. *"so the super-duper best way to fix for the above use case, if * *possible, would be to use collection_class=set rather than list. * *sets are all around better

Re: [sqlalchemy] Is it a bad idea to avoid to use backref and back_populates ?

2017-11-08 Thread Mike Bayer
On Wed, Nov 8, 2017 at 5:05 AM, Sven wrote: > Hello, > > I am actually working on my previous post about the OrderedDict and the None > values and I met new problems and new questions. I didn't found answers on > the Internet, so here I am ! > > As explained in the official

[sqlalchemy] Is it a bad idea to avoid to use backref and back_populates ?

2017-11-08 Thread Sven
Hello, I am actually working on my previous post about the OrderedDict and the None values and I met new problems and new questions. I didn't found answers on the Internet, so here I am ! As explained in the official documentation (or in the following topic :