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.
Parameters:
array |
$tables: |
an array of Doctrine_Table objects or component names |
API Tags:
Return: | an array of component names in flushing order |
Access: | public |
deletes given record and all the related composites this operation is isolated by a transaction
this event can be listened by the onPreDelete and onDelete listeners
Parameters:
API Tags:
Return: | true on success, false on failure |
Access: | public |
deletes all related composites this method is always called internally when a record is deleted
Parameters:
API Tags:
Information Tags:
Throws: | PDOException if something went wrong at database level |
inserts a record into database
Parameters:
API Tags:
saves the given record
Parameters:
API Tags:
saveAll persists all the pending records from all tables
API Tags:
Information Tags:
Throws: | PDOException if something went wrong at database level |
saveAssociations
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 primary keys 3, 4 and 5, this method would first destroy the associations to 1 and 2 and then save new associations to 4 and 5
Parameters:
API Tags:
Information Tags:
Throws: | PDOException if something went wrong at database level |
saves the given record
Parameters:
API Tags:
saveRelated saves all related records to $record
Parameters:
API Tags:
Information Tags:
Throws: | PDOException if something went wrong at database level |
update updates the given record
Parameters:
API Tags:
Return: | whether or not the update was successful |
Access: | public |