[sqlalchemy] Re: multiple inserts of sqlalchemy instances?

2007-10-23 Thread Lukasz Szybalski
On 10/22/07, Barry Hart [EMAIL PROTECTED] wrote: I've written code similar to this with no problems. Are you using assign_mapper? If so, the save() call is unnecessary. Do you get this error on the first object or on some subsequent object? Barry - Original Message From:

[sqlalchemy] Re: multiple inserts of sqlalchemy instances?

2007-10-23 Thread Michael Bayer
On Oct 23, 2007, at 10:16 AM, Lukasz Szybalski wrote: I am having an issue with a second new.flush() Does this require multiple sessions for each save? I can't find any documentation on multiple inserts with assign_mapper. Lucas Your best bet is to use version 0.4 and to not use any

[sqlalchemy] Re: multiple inserts of sqlalchemy instances?

2007-10-23 Thread Lukasz Szybalski
On 10/23/07, Michael Bayer [EMAIL PROTECTED] wrote: On Oct 23, 2007, at 10:16 AM, Lukasz Szybalski wrote: I am having an issue with a second new.flush() Does this require multiple sessions for each save? I can't find any documentation on multiple inserts with assign_mapper. Lucas

[sqlalchemy] Re: multiple inserts of sqlalchemy instances?

2007-10-23 Thread Wes Duff
I have done something like this. I am using active mapper. I am new to all of this as well, but see if this helps any a = model.Document() a.first_name = kw.get('first_name') a.last_name = kw.get('last_name') b = model.Body() b.body_name = kw.get('body_name') And that is all I was doing of

[sqlalchemy] Re: multiple inserts of sqlalchemy instances?

2007-10-23 Thread Michael Bayer
On Oct 23, 2007, at 1:07 PM, Lukasz Szybalski wrote: So you cannot do multiple writes using extensions assign_mapper, mapper aka python class mapped to sql table? you can do anything with assign_mapper, just that its usage is going to be more confusing since it auto-saves objects, and

[sqlalchemy] Re: multiple inserts of sqlalchemy instances?

2007-10-22 Thread Barry Hart
I've written code similar to this with no problems. Are you using assign_mapper? If so, the save() call is unnecessary. Do you get this error on the first object or on some subsequent object? Barry - Original Message From: Lukasz Szybalski [EMAIL PROTECTED] To: