Aha, thanks On Jun 26, 10:51 pm, "Rick Morrison" <[EMAIL PROTECTED]> 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 type of > bulk operation is best done with the SQL generation portion of the library, > like so (using an implicit bound connection here): > > users.update(users.c.group == contractor).execute({users.c.group = > consultant}) > > On 6/26/07, voltron <[EMAIL PROTECTED]> wrote: > > > > > Could someone tell me how I would execute this SQL using data mapping? > > > # SQL > > > UPDATE users SET group=consultant WHERE group = contractor; > > > # Mapped object > > user_mapper = mapper(User, users) > > user = User() > > > Thanks
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---