메소드 |
설명 |
|
__construct ( PersistenceBuilder $pb, DocumentManager $dm, ClassMetadata $class ) |
Initializes a new DocumentPersister instance. |
|
addInsert ( object $document ) |
Adds a document to the queued insertions. |
|
delete ( mixed $document, array $options = [] ) |
Removes document from mongo |
|
executeInserts ( array $options = [] ) : array |
Executes all queued document insertions and returns any generated post-insert
identifiers that were created as a result of the insertions. |
|
exists ( object $document ) : boolean |
Checks whether the given managed document exists in the database. |
|
getClassMetadata ( ) : ClassMetadata |
Gets the ClassMetadata instance of the document class this persister is used for. |
|
load ( array $criteria, object $document = null, array $hints = [], integer $lockMode ) : object |
Loads an document by a list of field criteria. |
|
loadAll ( array $criteria = [] ) : array |
Loads a list of documents by a list of field criteria. |
|
loadCollection ( PersistentCollection $collection ) |
|
|
lock ( object $document, integer $lockMode ) |
Locks document by storing the lock mode on the mapped lock field. |
|
prepareQuery ( string | array $query ) : array |
Prepares a query and converts values to the types mongodb expects. |
|
refresh ( array $id, object $document ) |
Refreshes a managed document. |
|
unlock ( object $document ) |
Releases any lock that exists on this document. |
|
update ( object $document, array $options = [] ) |
Updates the already persisted document if it has any new changesets. |
|