[sqlalchemy] Re: Duplicate entry '0' for key 'PRIMARY'

2023-09-21 Thread Martin Parrag
Hi All! Crisis reverted, turned out my database column didn't have the autoincerement flag. Sorry for the topic. Martin Parrag a következőt írta (2023. szeptember 21., csütörtök, 16:53:14 UTC+2): > Hi Guys! > > I have ORMs with autoincrement primary keys, and I'd like to achive a > multiple

[sqlalchemy] Duplicate entry '0' for key 'PRIMARY'

2023-09-21 Thread Martin Parrag
Hi Guys! I have ORMs with autoincrement primary keys, and I'd like to achive a multiple insert with sqlalchemy. I'm making a lot of objects and adding them to the session, and after I'm done, I'd like to make session.commit() but then I get this error: (MySQLdb.IntegrityError) (1062,