StandardEntityPersister
public class StandardEntityPersister
Field Summary | |
---|---|
protected Doctrine\ORM\Mapping\ClassMetadata | Metadata object that describes the mapping of the mapped entity class. |
protected array | The map of column names to DBAL mapping types of all prepared columns used when INSERTing or UPDATEing an entity. |
protected Doctrine\DBAL\Connection $conn | The underlying Connection of the used EntityManager. |
protected Doctrine\ORM\EntityManager | The EntityManager instance. |
protected AbstractPlatform | The database platform. |
protected array | Queued inserts. |
protected array | Case-sensitive mappings of column names as they appear in an SQL result set to column names as they are defined in the mapping. |
protected string | The SELECT column list SQL fragment used for querying entities by this persister. |
protected integer | Counter for creating unique SQL table and column aliases. |
protected array | Map from class names (FQCN) to the corresponding generated SQL table aliases. |
Constructor Summary | |
---|---|
StandardEntityPersister(Doctrine\ORM\EntityManager em, Doctrine\ORM\Mapping\ClassMetadata class) Initializes a new StandardEntityPersister that uses the given EntityManager and persists instances of the class described by the given ClassMetadata descriptor. |
Method Summary | |
---|---|
void | addInsert(object entity) Adds an entity to the queued insertions. |
void | delete(object entity) Deletes an entity. |
array | Executes all queued entity insertions and returns any generated post-insert identifiers that were created as a result of the insertions. |
Doctrine\ORM\Mapping\ClassMetadata | Gets the ClassMetadata instance of the entity class this persister is used for. |
string | Gets the INSERT SQL used by the persister to persist a new entity. |
string | getOwningTable(string fieldName) Gets the name of the table that owns the column the given field is mapped to. |
The | load(array criteria, object entity, mixed assoc, array hints, $assoc The) Loads an entity by a list of field criteria. |
array | loadAll(array criteria) Loads a list of entities by a list of field criteria. |
void | loadManyToManyCollection(ManyToManyMapping assoc, array criteria, PersistentCollection coll) Loads a collection of entities of a many-to-many association. |
void | loadOneToManyCollection(OneToManyMapping assoc, array criteria, mixed coll, PersistentCollection The) Loads a collection of entities in a one-to-many association. |
void | refresh(array id, object entity) Refreshes an entity. |
void | update(object entity) Updates an entity. |
protected Doctrine\ORM\Mapping\ClassMetadata $_class
Metadata object that describes the mapping of the mapped entity class.
protected array $_columnTypes = array()
The map of column names to DBAL mapping types of all prepared columns used when INSERTing or UPDATEing an entity.
protected Doctrine\DBAL\Connection $conn $_conn
The underlying Connection of the used EntityManager.
protected Doctrine\ORM\EntityManager $_em
The EntityManager instance.
protected AbstractPlatform $_platform
The database platform.
protected array $_queuedInserts = array()
Queued inserts.
protected array $_resultColumnNames = array()
Case-sensitive mappings of column names as they appear in an SQL result set to column names as they are defined in the mapping. This is necessary because different RDBMS vendors return column names in result sets in different casings.
protected string $_selectColumnListSql
The SELECT column list SQL fragment used for querying entities by this persister. This SQL fragment is only generated once per request, if at all.
protected integer $_sqlAliasCounter
Counter for creating unique SQL table and column aliases.
protected array $_sqlTableAliases = array()
Map from class names (FQCN) to the corresponding generated SQL table aliases.
public StandardEntityPersister(Doctrine\ORM\EntityManager em, Doctrine\ORM\Mapping\ClassMetadata class)
Initializes a new StandardEntityPersister that uses the given EntityManager and persists instances of the class described by the given ClassMetadata descriptor.
public void addInsert(object entity)
Adds an entity to the queued insertions.
The entity remains queued until executeInserts()
is invoked.
public void delete(object entity)
Deletes an entity.
public array executeInserts()
Executes all queued entity insertions and returns any generated post-insert identifiers that were created as a result of the insertions.
If no inserts are queued, invoking this method is a NOOP.
public Doctrine\ORM\Mapping\ClassMetadata getClassMetadata()
Gets the ClassMetadata instance of the entity class this persister is used for.
public string getInsertSQL()
Gets the INSERT SQL used by the persister to persist a new entity.
public string getOwningTable(string fieldName)
Gets the name of the table that owns the column the given field is mapped to.
public The load(array criteria, object entity, mixed assoc, array hints, $assoc The)
Loads an entity by a list of field criteria.
public array loadAll(array criteria)
Loads a list of entities by a list of field criteria.
public void loadManyToManyCollection(ManyToManyMapping assoc, array criteria, PersistentCollection coll)
Loads a collection of entities of a many-to-many association.
public void loadOneToManyCollection(OneToManyMapping assoc, array criteria, mixed coll, PersistentCollection The)
Loads a collection of entities in a one-to-many association.
public void refresh(array id, object entity)
Refreshes an entity.
public void update(object entity)
Updates an entity.
A basic entity persister that maps an entity with no (mapped) inheritance to a single table in the relational database.