Hi,

   Cool, thanks for your reply. I will try these methods later.

   Have a nice day.

JoJo



2010/1/25 Земсков Юрий <y...@zemskov.name>

>  See no difference. Maybe symfony tutorial is a bit outdated. Using pre-
> post- methods you can do the same stuff while writing less code.
>
>
> Just don't forget to use $con passed to pre- post- methods in a parameter
> and your database changes will run inside a transaction, started in
> BaseObject::save() method.
>
>
> Вы писали 25 января 2010 г., 0:48:43:
>
>
>   >
>
> Hello everyone,
>
>
>
>   I got a question about Propel Transactions.
>
>
>
>   As in symfony tutorial, it proposes to override the save method for using
> transaction. For example:
>
>
>   $con->beginTransaction();
>
>   try {
>
>     $ret = parent::save($con);
>
>     // Some code here for other treatement
>
>     $con->commit();
>
>     return $ret;
>
>   } catch (Exception $e) {
>
>     $con->rollBack();
>
>     throw $e;
>
>   }
>
>
>   But in propel tutorial, it proposes to use pre-, post- methods, like
> postsave(), preinsert() etc.
>
>
>   For transaction usage, are there any differences between these
>
> two ways?
>
>
>   Thanks a lot.
>
>
>
> JoJo
>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
>
> To post to this group, send email to symfony-us...@googlegroups.com.
>
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> .
>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
> --
>
> С уважением,
>
>  Земсков Юрий                          
> mailto:y...@zemskov.name<y...@zemskov.name>
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.

Reply via email to