Thanks Mike, that clears up a few things
On Jun 27, 2:08 am, Mike Orr [EMAIL PROTECTED] wrote:
On 6/26/07, voltron [EMAIL PROTECTED] wrote:
sess = create_session()
allusers = sess.query(User).select()
for user in allusers:
user.group = contractor
print x.name
This adds the
Updates and inserts on the ORM side of the street are single-object kinds of
things. The pattern is to load a list of objects, make the appropriate
modifications to the those in-memory objects, and then issue a session
flush().
This type of
bulk operation is best done with the SQL generation
would I have to do something like this?
sess = create_session()
allusers = sess.query(User).select()
for user in allusers:
user.group = contractor
print x.name
On Jun 26, 10:40 pm, voltron [EMAIL PROTECTED] wrote:
Could someone tell me how I would execute this SQL using data
On Jun 26, 2007, at 4:51 PM, Rick Morrison wrote:
Updates and inserts on the ORM side of the street are single-object
kinds of things. The pattern is to load a list of objects, make the
appropriate modifications to the those in-memory objects, and then
issue a session flush().
This
On 6/26/07, voltron [EMAIL PROTECTED] wrote:
sess = create_session()
allusers = sess.query(User).select()
for user in allusers:
user.group = contractor
print x.name
This adds the overhead of creating a Python object for every row. If
you already have many of the objects in memory