Re: [sqlalchemy] SQLlite: enforce a unique constraint on a relation?

2018-03-12 Thread Ryan Holmes
Thanks Mike, While I would rather this be a hard constraint on the database, not enforced in python, I understand that SQLite is pretty limited in this regard, so I'm down to try anything really. I also had the idea of using a custom collection simply because the project already uses them heavi

Re: [sqlalchemy] SQLlite: enforce a unique constraint on a relation?

2018-03-11 Thread Mike Bayer
On Sun, Mar 11, 2018 at 6:42 PM, Ryan Holmes wrote: > (cross posted from https://stackoverflow.com/questions/49225846/) > > Lets say I have 3 tables: parent, child, and a linker table for the two for > a many-to-many relationship, `parentChildren`. Each parent can have multiple > children, and eac

[sqlalchemy] SQLlite: enforce a unique constraint on a relation?

2018-03-11 Thread Ryan Holmes
(cross posted from https://stackoverflow.com/questions/49225846/) Lets say I have 3 tables: parent, child, and a linker table for the two for a many-to-many relationship, `parentChildren`. Each parent can have multiple children, and each child can have multiple parents. If parent 1 already has