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 cource you need to make the form with the inputs for first, last, and
body name and assign **kw to your dict()

That is how I have been assigning multiple items during one run.

I am by no means an expert, just thought this might help

On 10/23/07, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
>
>
> 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
> > >
> >
> > Your best bet is to use version 0.4 and to not use any extensions
> > such as assign_mapper.
>
> So you cannot do multiple writes using extensions assign_mapper,
> mapper aka python class mapped to sql table?
>
> What I should use then is
> user_table = sqlalchemy.Table('Users', metadata, autoload=True)
> new=users_table.insert()
>
>
> and new.execute(somedictionary,somedictionary2)
> or
> new.execute(somedictionary)
> #change somedictionary
> new.execute(somedictionary)
>
> Thanks,
> Lucas
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to