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

0.11 Doctrine_Connection_UnitOfWork

Doctrine Connection UnitOfWork

Note: This class does not have the semantics of a real "Unit of Work" in 0.10/1.0. Database operations are not queued. All changes to objects are immediately written to the database. You can think of it as a unit of work in auto-flush mode. Re

Inheritence

Doctrine_Connection_UnitOfWork  < Doctrine_Connection_Module

Method Details

  • $record record to be updated

    (boolean) update(( ) $record)

    updates given record

    Doctrine_Connection_UnitOfWork


  • saveAll()

    saveAll persists all the pending records from all tables

    throws PDOException if something went wrong at database level


  • processSingleInsert(( ) $record)


  • saveAssociations(( ) $record)

    this method takes a diff of one-to-many / many-to-many original and current collections and applies the changes
    for example if original many-to-many related collection has records with primary keys 1,2 and 3 and the new collection has records with prima

    throws Doctrine_Connection_Exception if something went wrong at database level


  • (boolean) delete(( ) $record)

    Deletes the given record and all the related records that participate in an application-level delete cascade.

    this event can be listened by the onPreDelete and onDelete listeners

    Doctrine_Connection_UnitOfWork


  • saveGraph(( ) $record)

    Saves the given record and all associated records.

    (The save() operation is always cascaded in 0.10/1.0).


  • save(( ) $record)

    saves the given record


  • $record The record for which the delete operation will be cascaded.

    _cascadeDelete(( ) $record, [[[amp]]]$deletions)

    Cascades an ongoing delete operation to related objects. Applies only on relations that have 'delete' in their cascade options.

    This is an application-level cascade. Related objects that participate in the cascade and are not yet loaded are fetched from the database. Exception: many-valued relations are always (re-)fetched from the database to make sure we have all of them.

    throws PDOException If something went wrong at database level


  • $record record to be inserted

    (boolean) insert(( ) $record)

    inserts a record into database


  • $tables an array of Doctrine_Table objects or component names

    (array) buildFlushTree($tables)

    buildFlushTree builds a flush tree that is used in transactions

    The returned array has all the initialized components in 'correct' order. Basically this means that the records of those components can be saved safely in the order specified by the returned array.

    Doctrine_Connection_UnitOfWork


  • saveRelated(( ) $record)

    saveRelated saves all related records to $record

    throws PDOException if something went wrong at database level


Comments (0) [ add comment ]

 No Comments

Add Comment

Add New Comment
Please enter follow the doctrine