Re: [sqlalchemy] Re: Two classes linked to the same backref attribute in a third classe

2017-11-26 Thread Mike Bayer
On Sun, Nov 26, 2017 at 7:20 AM, Olaf wrote: > Thank you. Yes, it could be interesting to use SQLAlchemy functionalities to > reduce all these metaclass conflicts. But, is it possible, in the > "on_new_class" method, to access to the 'name', 'bases' and 'attrs' sure, you've got cls.__name__, cls.

[sqlalchemy] Re: Two classes linked to the same backref attribute in a third classe

2017-11-26 Thread Olaf
Thank you. Yes, it could be interesting to use SQLAlchemy functionalities to reduce all these metaclass conflicts. But, is it possible, in the "on_new_class" method, to access to the 'name', 'bases' and 'attrs' attributes habitually gived by the _init_ method of a metaclass ? I tried to search

Re: [sqlalchemy] Re: Two classes linked to the same backref attribute in a third classe

2017-11-25 Thread Mike Bayer
On Sat, Nov 25, 2017 at 9:04 AM, Olaf wrote: > Hello, > > I tried to implement the table_per_related.py solution in my code but I > face new problems related to metaclasses. > I haven't looked deeply yet but at first this looks like an overuse of metaclasses.The reason metaclasses are often

[sqlalchemy] Re: Two classes linked to the same backref attribute in a third classe

2017-11-25 Thread Olaf
Hello, I tried to implement the table_per_related.py solution in my code but I face new problems related to metaclasses. Here is a schema to help you to understand the code :

Re: [sqlalchemy] Re: Two classes linked to the same backref attribute in a third classe

2017-11-21 Thread Mike Bayer
> I was more interested by the discriminator_on_association. But after some > tests, I find that the table_per_related solution works fine and the database > is cleaner as I expected. yep!! see that nobody likes it at first On Tue, Nov 21, 2017 at 1:04 PM, Olaf wrote: > Hello, > > Sorry f

[sqlalchemy] Re: Two classes linked to the same backref attribute in a third classe

2017-11-21 Thread Olaf
Hello, Sorry for the delay of the answer, I was busy these last days. I tried every solution and I must honestly say that at the beginning, I was not attracted by the table_per_association.py and the table_per_related.py solutions because I didn't like the idea of having tables automatically g