[sqlalchemy] Re: I can replace an object with another in python, by changing the object dict to the other object dict. How does it settle with sqlalchemy? Does it works when another mapped object

2008-12-06 Thread kobi...@gmail.com
I have talked to my customers, and they agreed that your solution is great. To match their demands, I've changed two things: 1. If the object exists in the db during construction than it's returned, else the object returned is a new object (that isn't returned). 2. All the attributes that

[sqlalchemy] Re: I can replace an object with another in python, by changing the object dict to the other object dict. How does it settle with sqlalchemy? Does it works when another mapped object

2008-12-03 Thread kobi...@gmail.com
A. Thanks for this great idea. From your suggestion, I realize that if I am going to use the new method, than I must enforce my __new__ (and __init__) to get all the unique fields as arguments. Then, if the object already exists in the db to return it, and otherwise save the new object. An