Pt_BR En Ja De Fr 
You are currently viewing the Development branch api documentation. Switch to 0.11 or 1.0

Development Doctrine_Connection_UnitOfWork

Doctrine Connection UnitOfWork

The UnitOfWork is responsible for tracking changes to objects during an "object-level" transaction and for writing out changes to the database in the correct order.

Method Details

  • registerDeleted(( ) $entity)

    Registers a deleted entity.


  • (integer) detachAll($entityName = null)

    Detaches all currently managed entities.

    Alternatively, if an entity class name is given, all entities of that type (or subtypes) are detached. Don't forget that entities are registered in the identity map with the name of the root entity class. So calling detachAll() with a class name t

    Doctrine_Connection_UnitOfWork


  • commit()

    Commits the unit of work, executing all operations that have been postponed up to this point.


  • delete(( ) $entity)

    Deletes an entity as part of the current unit of work.


  • $entity The entity to register.

    (boolean) addToIdentityMap(( ) $entity)

    Registers an entity in the identity map.

    Note that entities in a hierarchy are registered with the class name of the root entity.

    Doctrine_Connection_UnitOfWork


  • $oid object identifier

    (boolean) detach(( ) $entity, $oid)

    Detaches an entity from the persistence management. It's persistence will no longer be managed by Doctrine.

    Doctrine_Connection_UnitOfWork


  • (unknown) removeFromIdentityMap(( ) $entity)

    Removes an entity from the identity map.


  • $entity The entity to save.

    save(( ) $entity)

    Saves an entity as part of the current unit of work.


  • (unknown) isEntityRegistered(( ) $entity)

    Enter description here...


  • close()


  • (Doctrine::ORM::Entity) getByIdHash($idHash, $rootClassName)

    Finds an entity in the identity map by its identifier hash.


  • registerNew(( ) $entity)

    Register a new entity.


  • (boolean) isRegisteredRemoved(( ) $entity)

    Checks whether an entity is registered as removed/deleted with the unit of work.


  • __construct(( ) $em)

    Constructor.

    Creates a new UnitOfWork.


  • $table The table from which the records are going to be deleted.
    $numRecords The number of records that are going to be deleted.

    (string) getIdentityMap((Doctrine_Table) $table, $numRecords)

    Builds the SQL condition to target multiple records who have a composite primary key.

    Doctrine_Connection_UnitOfWork


  • tryGetByIdHash($idHash, $rootClassName)


  • (boolean) isInIdentityMap(( ) $entity)

    Checks whether an entity is registered in the identity map of the UnitOfWork.


  • (boolean) isRegisteredNew(( ) $entity)

    Checks whether an entity is registered as new on the unit of work.


  • (boolean) containsIdHash($idHash, $rootClassName)

    Checks whether an identifier hash exists in the identity map.


  • registerDirty(( ) $entity)

    Registers a dirty entity.


  • getCommitOrderCalculator()


  • registerClean(( ) $entity)

    Registers a clean entity.

    The entity is simply put into the identity map.


  • (string) getIdentifierHash($id)

    Gets the identifier hash for a set of identifier values.

    The hash is just a concatenation of the identifier values. The identifiers are concatenated with a space.
    Note that this method always returns a string. If the given array is empty, an empty string is returned.

    Doctrine_Connection_UnitOfWork


  • (boolean) isRegisteredDirty(( ) $entity)

    Checks whether an entity is registered as dirty in the unit of work.

    Note: Is not very useful currently as dirty entities are only registered at commit time.


Comments (0) [ add comment ]

 No Comments

Add Comment

Add New Comment
Please enter follow the doctrine