Class:OneToOneMapping - Superclass: AssociationMapping AssociationMapping
⌊ OneToOneMapping
public class OneToOneMapping
extends AssociationMapping
Field Summary | |
---|---|
array | READ-ONLY: A map of join column names to field names that are used in cases when the join columns are fetched as part of the query result. |
array | READ-ONLY: The join column definitions. |
boolean | READ-ONLY: Whether to delete orphaned elements (when nulled out, i.e. |
mixed | READ-ONLY: Maps the source foreign/primary key columns to the target primary/foreign key columns. |
mixed | READ-ONLY: Maps the target primary/foreign key columns to the source foreign/primary key columns. |
Fields inherited from Doctrine\ORM\Mapping\AssociationMapping | |
---|---|
FETCH_EAGER, FETCH_LAZY, declared, fetchMode, inherited, inversedBy, isCascadeDetach, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isOwningSide, joinTable, mappedBy, sourceEntityName, sourceFieldName, targetEntityName |
Method Summary | |
---|---|
boolean | {@inheritdoc} |
void | load(object sourceEntity, object targetEntity, EntityManager em, array joinColumnValues, object target) {@inheritdoc} |
Methods inherited from Doctrine\ORM\Mapping\AssociationMapping | |
---|---|
getQuotedJoinTableName, hasCascades, isEagerlyFetched, isLazilyFetched, isManyToMany, isOneToMany, isOneToOne, load, usesJoinTable |
public array $joinColumnFieldNames = array()
READ-ONLY: A map of join column names to field names that are used in cases when the join columns are fetched as part of the query result.
public array $joinColumns = array()
READ-ONLY: The join column definitions. Only present on the owning side.
public boolean $orphanRemoval = false
READ-ONLY: Whether to delete orphaned elements (when nulled out, i.e. $foo->other = null)
public mixed $sourceToTargetKeyColumns = array()
READ-ONLY: Maps the source foreign/primary key columns to the target primary/foreign key columns. i.e. source.id (pk) => target.user_id (fk). Reverse mapping of _targetToSourceKeyColumns.
public mixed $targetToSourceKeyColumns = array()
READ-ONLY: Maps the target primary/foreign key columns to the source foreign/primary key columns. i.e. target.user_id (fk) => source.id (pk). Reverse mapping of _sourceToTargetKeyColumns.
public boolean isOneToOne()
public void load(object sourceEntity, object targetEntity, EntityManager em, array joinColumnValues, object target)
A one-to-one mapping describes a uni-directional mapping from one entity to another entity.
IMPORTANT NOTE:
The fields of this class are only public for 2 reasons: 1) To allow fast READ access. 2) To drastically reduce the size of a serialized instance (private/protected members get the whole class name, namespace inclusive, prepended to every property in the serialized representation).
Instances of this class are stored serialized in the metadata cache together with the owning ClassMetadata instance.