15 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: Is there a way to re...| From | Sent On | Attachments |
|---|---|---|
| Denis S. Otkidach | 26 Dec 2007 09:12 | |
| Michael Bayer | 26 Dec 2007 11:38 | |
| Denis S. Otkidach | 27 Dec 2007 01:11 | |
| Michael Bayer | 27 Dec 2007 13:58 | |
| Rick Morrison | 27 Dec 2007 13:59 | |
| braydon fuller | 27 Dec 2007 15:01 | |
| Rick Morrison | 27 Dec 2007 15:06 | |
| Denis S. Otkidach | 28 Dec 2007 02:49 | |
| Michael Bayer | 28 Dec 2007 07:25 | |
| Denis S. Otkidach | 11 Jan 2008 09:30 | |
| Michael Bayer | 11 Jan 2008 09:41 | |
| Denis S. Otkidach | 15 Jan 2008 05:20 | |
| Michael Bayer | 15 Jan 2008 07:54 | |
| Denis S. Otkidach | 16 Jan 2008 01:43 | |
| Michael Bayer | 16 Jan 2008 08:41 |
| Subject: | [sqlalchemy] Re: Is there a way to replace object in DB?![]() |
|---|---|
| From: | Michael Bayer (mike...@zzzcomputing.com) |
| Date: | 12/28/2007 07:25:34 AM |
| List: | com.googlegroups.sqlalchemy |
On Dec 28, 2007, at 5:50 AM, Denis S. Otkidach wrote:
Sure, I can get an object from DB and copy data from new one. But there is a lot of object types, so have to invent yet another meta description for it (while it already exists in sqlalchemy). And requirements changes often, so I have to change scheme in 2 places. This is not good and error prone. Why I have to invent new description when there is already one from sqlalchemy mapping? Can't I use it for my purpose? Something like merge(objFromDB, newObj) will solve the problem.
session.merge() does copy the attributes of one object into another. theres some bugs with dont_load that have been fixed in trunk so try out the trunk if you have problems.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqla...@googlegroups.com
To unsubscribe from this group, send email to
sqla...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---




