Doctrine


Doctrine\ORM\Mapping\ManyToManyMapping
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 43

Class ManyToManyMapping

Class:ManyToManyMapping - Superclass: AssociationMapping
AssociationMapping
⌊ ManyToManyMapping

public class ManyToManyMapping
extends AssociationMapping

A many-to-many mapping describes the mapping between two collections of entities.

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.

Since:
2.0
Author:
Roman Borschel
Giorgio Sironi

Field Summary
mixed

$joinTableColumns

READ-ONLY: List of aggregated column names on the join table.

array

$orderBy

READ-ONLY: Order this collection by the given DQL snippet.

mixed

$relationToSourceKeyColumns

READ-ONLY: Maps the columns in the relational table to the columns in the source table.

mixed

$relationToTargetKeyColumns

READ-ONLY: Maps the columns in the relation table to the columns in the target table.

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

isManyToMany()

{@inheritdoc}

void

load(object sourceEntity, mixed targetCollection, EntityManager em, array joinColumnValues, object The, array , object target)

Loads entities in $targetCollection using $em.

Methods inherited from Doctrine\ORM\Mapping\AssociationMapping
getQuotedJoinTableName, hasCascades, isEagerlyFetched, isLazilyFetched, isManyToMany, isOneToMany, isOneToOne, load, usesJoinTable

Field Detail

/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 58

joinTableColumns

public mixed $joinTableColumns = array()

READ-ONLY: List of aggregated column names on the join table.


/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 70

orderBy

public array $orderBy

READ-ONLY: Order this collection by the given DQL snippet.

Only simple unqualified field names and ASC|DESC are allowed


/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 48

relationToSourceKeyColumns

public mixed $relationToSourceKeyColumns = array()

READ-ONLY: Maps the columns in the relational table to the columns in the source table.


/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 53

relationToTargetKeyColumns

public mixed $relationToTargetKeyColumns = array()

READ-ONLY: Maps the columns in the relation table to the columns in the target table.


Method Detail

/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 181

isManyToMany

public boolean isManyToMany()


/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 146

load

public void load(object sourceEntity, mixed targetCollection, EntityManager em, array joinColumnValues, object The, array , object target)

Loads entities in $targetCollection using $em. The data of $sourceEntity are used to restrict the collection via the join table.

Parameters:
The - owner of the collection.
The - collection to populate.

Doctrine