#1427: Database Manager returns closed Doctrine 2 EntityManager after PDO
Exception
-------------------------------+--------------------------------------------
 Reporter:  mr.hash@…          |       Owner:  david
     Type:  defect             |      Status:  new  
 Priority:  normal             |   Milestone:  1.0.7
Component:  database           |     Version:  1.0.6
 Severity:  normal             |    Keywords:       
Has_patch:  0                  |  
-------------------------------+--------------------------------------------

Comment(by anonymous):

 the fundamental approach taken by Doctrine is that if a transaction (aka a
 flush) fails, then things went horribly wrong and you will need to reset
 everything .. essentially log the problem and die gracefully :)

 now in order to reset (aka get a new EntityManager) we just recently added
 a ManagerRegistry interface and an abstraction implementation:
 https://github.com/doctrine/common/pull/65

 so really try to avoid failed transactions at all costs. if they do
 happen, you need to know your models and if you can just do some minor
 cleanups, persist stuff, mark managed instances as dirty etc. if you don't
 use events you should be fairly save. even if any auto increments were
 generated it shouldn't cause issues (as long as you don't rely on their
 order) as RDBMS do not rollback incrementing of auto increment counters or
 sequences.

-- 
Ticket URL: <http://trac.agavi.org/ticket/1427#comment:10>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5



_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to