Ok :)
Was not the answer i was hoping for. :)
The thing is my script does make at least 2 queries over the db
("Character.query.all()" is simplifying). It can't be helped. It can't
just push the query before. So then it's probably better to not flush
:P
Thank you again (also for the great work on elixir)
k.
On Mon, Mar 8, 2010 at 16:36, Gaetan de Menten <[email protected]> wrote:
>
>> How could be the above example be modified to work with autoflush?
>
> Character.query.all()
> matrix = Movie(title='Matrix')
> rabbit = Character(name='The White Rabbit')
> matrix.characters.append(rabbit) # long exception ....
> session.commit()
>
> Hope it helps,
>
> Gaƫtan de Menten
>
--
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en.