Re: [sqlalchemy] A record is dropped on add

2013-10-04 Thread Werner
Michael, On 03/10/2013 23:05, Michael Bayer wrote: On Oct 3, 2013, at 5:42 AM, Werner werner.bru...@sfr.fr wrote: ... The relation setup for the classes involved, and I suspect Vintage.drinkinfo/Cellarbook.drinkinfo ones: Vintage.vintadd = sao.relationship('Vintadd', uselist=False,

[sqlalchemy] A record is dropped on add

2013-10-03 Thread Werner
Hi, I have a problem that when I add a record to 'cellarbook' using the following code the 'old' cellarbook entry is dropped from the db. oldCB = session.query(db.Cellarbook).get(7) newCB = db.Cellarbook() # set some data from existing dbitem newCB.cellar = oldCB.cellar newCB.authuser =

Re: [sqlalchemy] A record is dropped on add

2013-10-03 Thread Werner
On 03/10/2013 11:42, Werner wrote: Hi, I have a problem that when I add a record to 'cellarbook' using the following code the 'old' cellarbook entry is dropped from the db. oldCB = session.query(db.Cellarbook).get(7) newCB = db.Cellarbook() # set some data from existing dbitem newCB.cellar

Re: [sqlalchemy] A record is dropped on add

2013-10-03 Thread Michael Bayer
On Oct 3, 2013, at 5:42 AM, Werner werner.bru...@sfr.fr wrote: Hi, I have a problem that when I add a record to 'cellarbook' using the following code the 'old' cellarbook entry is dropped from the db. oldCB = session.query(db.Cellarbook).get(7) newCB = db.Cellarbook() # set some