Being more specific I talk about this part:

>>> jack = User('jack', 'Jack Bean', 'gjffdd')>>> jack.addresses[]

>>> jack.addresses = [...                 
>>> Address(email_address='j...@google.com'),...                 
>>> Address(email_address='j...@yahoo.com')]


Are addresses automaticamente added and commited?
I know it is commiting jack and jack has addresses, but how do i add jack
first (session 1) and right after commiting jack without addresses add a
set of addresses and commit them to the database?

2013/4/26 Mauricio de Abreu Antunes <mauricio.abr...@gmail.com>

> Everytime I code SQLAlchemy relationships I note that insert operation
> like this (tutorial) does not need commit()
>
> http://docs.sqlalchemy.org/en/latest/orm/tutorial.html#working-with-related-objects
>
> When using this bidirectional relationship() is the data automatically
> commited to the dabase?
>
> Probably this is an easy question but I can not get how to perform a
> rollback in jack.addresses.
>
> --
> *Mauricio de Abreu Antunes*
> Mobile: (51)930-74-525
> Skype: mauricio.abreua
>



-- 
*Mauricio de Abreu Antunes*
Mobile: (51)930-74-525
Skype: mauricio.abreua

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to