Re: [sqlalchemy] Should I use a surrogate primary key on an Association Object pattern?

2023-07-04 Thread Pierre Massé
Thanks a lot Micheal. It was the way I was leaning forward to - but having confirmation from a long time user made me take the decision. Have a nice day ! Pierre Le lun. 3 juil. 2023 à 22:54, 'Michael Mulqueen' via sqlalchemy < sqlalchemy@googlegroups.com> a écrit : > Hi Pierre, > > This isn't

Re: [sqlalchemy] Should I use a surrogate primary key on an Association Object pattern?

2023-07-03 Thread 'Michael Mulqueen' via sqlalchemy
Hi Pierre, This isn't an official answer, I'm just a long time user of SQLAlchemy. Either way should work fine. The association object is driven by the columns on the association table being FKs, whether or not they're part of a PK isn't relevant. I've used both ways. In my experience, an artifi

[sqlalchemy] Should I use a surrogate primary key on an Association Object pattern?

2023-07-03 Thread Pierre Massé
Dear all, I am currently reworking a bit of my model and stumbled into this question, which I think mainly has opinionated answers - but I would like to have some insight regarding SQLAlchemy usage or preferences. I have a situation where I am in the exact same case like the one described in the