Class: Doctrine_Relation
Source Location: /Doctrine/Relation.phpClass Doctrine_Relation
Implements interfaces:
Doctrine_Relation This class represents a relation between components Located in /Doctrine/Relation.php [line 33] Author(s):
Information Tags:
|
Child Class | Description |
---|---|
Doctrine_Relation_Association | Doctrine_Relation_Association this class takes care of association mapping (= many-to-many relationships, where the relationship is handled with an additional relational table which holds 2 foreign keys) |
Doctrine_Relation_ForeignKey | Doctrine_Relation_ForeignKey This class represents a foreign key relation |
Doctrine_Relation_LocalKey | Doctrine_Relation_LocalKey This class represents a local key relation |
MANY_AGGREGATE | constant for MANY_TO_MANY and ONE_TO_MANY aggregate relationships |
MANY_COMPOSITE | constant for MANY_TO_MANY and ONE_TO_MANY composite relationships |
ONE_AGGREGATE | constant for ONE_TO_ONE and MANY_TO_ONE aggregate relationships |
ONE_COMPOSITE | constant for ONE_TO_ONE and MANY_TO_ONE composite relationships |
Doctrine_Relation | __construct() | constructor |
Doctrine_Record|Doctrine_Collection | fetchRelatedFor() | fetchRelatedFor |
string | getAlias() | getAlias returns the relation alias |
string | getForeign() | getForeign returns the name of the foreignkey column where the localkey column is pointing at |
string | getLocal() | getLocal returns the name of the local column |
string | getRelationDql() | getRelationDql |
object Doctrine_Table | getTable() | getTable returns the foreign table object |
integer | getType() | getType returns the relation type, either 0 or 1 |
boolean | hasConstraint() | hasConstraint whether or not this relation has an explicit constraint |
boolean | isComposite() | isComposite returns whether or not this relation is a composite relation |
void | isDeferrable() | |
void | isDeferred() | |
void | isEqual() | |
boolean | isOneToOne() | isOneToOne returns whether or not this relation is a one-to-one relation |
void | offsetExists() | |
void | offsetGet() | |
void | offsetSet() | |
void | offsetUnset() | |
array | toArray() | toArray |
string | __toString() | __toString |
'foreign' => true,
'local' => true,
'class' => true,
'type' => true,
'table' => true,
'name' => false,
'refTable' => false,
'onDelete' => false,
'onUpdate' => false,
'deferred' => false,
'deferrable' => false,
'constraint' => false,
'equal' => false,
) [line 59]
Access: | protected |
|
constructor
Parameters:array | $definition: |
an associative array with the following structure: name foreign key constraint name local the local field(s) foreign the foreign reference field(s) table the foreign table object refTable the reference table object (if any) onDelete referential delete action onUpdate referential update action deferred deferred constraint checking alias relation alias type the relation type, either Doctrine_Relation::ONE or Doctrine_Relation::MANY constraint boolean value, true if the relation has an explicit referential integrity constraint The onDelete and onUpdate keys accept the following values: CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column in the parent table or in the child table. SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported. NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary key value is not allowed to proceed if there is a related foreign key value in the referenced table. RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as omitting the ON DELETE or ON UPDATE clause. SET DEFAULT |
API Tags:
Access: | public |
|
fetchRelatedFor
fetches a component related to given record
Parameters:Doctrine_Record | $record: |
API Tags:
Abstract: | |
Access: | public |
- Doctrine_Relation_Association::fetchRelatedFor() : fetchRelatedFor
- Doctrine_Relation_Association_Self::fetchRelatedFor()
- Doctrine_Relation_Nest::fetchRelatedFor()
- Doctrine_Relation_ForeignKey::fetchRelatedFor() : fetchRelatedFor
- Doctrine_Relation_LocalKey::fetchRelatedFor() : fetchRelatedFor
|
getAlias returns the relation alias
API Tags:
Access: | public |
|
getForeign returns the name of the foreignkey column where the localkey column is pointing at
API Tags:
Access: | public |
|
getLocal returns the name of the local column
API Tags:
Access: | public |
|
getRelationDql
Parameters:integer | $count: |
API Tags:
Access: | public |
- Doctrine_Relation_Association::getRelationDql() : getRelationDql
- Doctrine_Relation_Association_Self::getRelationDql() : getRelationDql
- Doctrine_Relation_Nest::getRelationDql() : getRelationDql
|
getTable returns the foreign table object
API Tags:
Access: | public |
|
getType returns the relation type, either 0 or 1
API Tags:
See: | Doctrine_Relation MANY_* and ONE_* constants |
Access: | public |
|
hasConstraint whether or not this relation has an explicit constraint
API Tags:
Access: | public |
|
isComposite returns whether or not this relation is a composite relation
API Tags:
Access: | public |
|
isOneToOne returns whether or not this relation is a one-to-one relation
API Tags:
Access: | public |
|
$offset: |
API Tags:
Access: | public |
- ArrayAccess::offsetExists
|
$offset: |
API Tags:
Access: | public |
- ArrayAccess::offsetGet
|
$offset: | ||
$value: |
API Tags:
Access: | public |
- ArrayAccess::offsetSet
|
$offset: |
API Tags:
Access: | public |
- ArrayAccess::offsetUnset