216 lines
11 KiB
HTML
216 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html lang="en">
|
|
<head>
|
|
|
|
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
|
|
<meta name="when" content="Wed, 14 Apr 2010 15:12:05 +0000">
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
|
|
<link rel="start" href="../../../overview-summary.html">
|
|
|
|
<title>OneToOneMapping (Doctrine)</title>
|
|
|
|
</head>
|
|
<body id="definition" onload="parent.document.title=document.title;">
|
|
|
|
<div class="header">
|
|
<h1>Doctrine</h1>
|
|
<ul>
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="../../../doctrine/orm/mapping/package-summary.html">Namespace</a></li>
|
|
<li class="active">Class</li>
|
|
<li><a href="../../../doctrine/orm/mapping/package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-all.html">Index</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="small_links">
|
|
<a href="../../../index.html" target="_top">Frames</a>
|
|
<a href="../../../doctrine/orm/mapping/onetoonemapping.html" target="_top">No frames</a>
|
|
</div>
|
|
<div class="small_links">
|
|
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
</div>
|
|
<hr>
|
|
|
|
<div class="qualifiedName">Doctrine\ORM\Mapping\OneToOneMapping</div>
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 43</div>
|
|
|
|
<h1>Class OneToOneMapping</h1>
|
|
|
|
<pre class="tree">Class:OneToOneMapping - Superclass: AssociationMapping
|
|
<a href="../../../doctrine/orm/mapping/associationmapping.html">AssociationMapping</a><br> ⌊ <strong>OneToOneMapping</strong><br /></pre>
|
|
|
|
<hr>
|
|
|
|
<p class="signature">public class <strong>OneToOneMapping</strong><br>extends <a href="../../../doctrine/orm/mapping/associationmapping.html">AssociationMapping</a>
|
|
|
|
</p>
|
|
|
|
<div class="comment" id="overview_description"><p>A one-to-one mapping describes a uni-directional mapping from one entity
|
|
to another entity.</p><p><b>IMPORTANT NOTE:</b></p><p>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).</p><p>Instances of this class are stored serialized in the metadata cache together with the
|
|
owning <tt>ClassMetadata</tt> instance.</p></div>
|
|
|
|
<dl>
|
|
<dt>Since:</dt>
|
|
<dd>2.0</dd>
|
|
<dt>Author:</dt>
|
|
<dd>Roman Borschel <roman@code-factory.org></dd>
|
|
<dd>Giorgio Sironi <piccoloprincipeazzurro@gmail.com></dd>
|
|
</dl>
|
|
<hr>
|
|
|
|
<table id="summary_field">
|
|
<tr><th colspan="2">Field Summary</th></tr>
|
|
<tr>
|
|
<td class="type"> array</td>
|
|
<td class="description"><p class="name"><a href="#joinColumnFieldNames">$joinColumnFieldNames</a></p><p class="description">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.</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> array</td>
|
|
<td class="description"><p class="name"><a href="#joinColumns">$joinColumns</a></p><p class="description">READ-ONLY: The join column definitions. </p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> boolean</td>
|
|
<td class="description"><p class="name"><a href="#orphanRemoval">$orphanRemoval</a></p><p class="description">READ-ONLY: Whether to delete orphaned elements (when nulled out, i.e. </p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> mixed</td>
|
|
<td class="description"><p class="name"><a href="#sourceToTargetKeyColumns">$sourceToTargetKeyColumns</a></p><p class="description">READ-ONLY: Maps the source foreign/primary key columns to the target primary/foreign key columns.
|
|
</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> mixed</td>
|
|
<td class="description"><p class="name"><a href="#targetToSourceKeyColumns">$targetToSourceKeyColumns</a></p><p class="description">READ-ONLY: Maps the target primary/foreign key columns to the source foreign/primary key columns.
|
|
</p></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="inherit">
|
|
<tr><th colspan="2">Fields inherited from Doctrine\ORM\Mapping\AssociationMapping</th></tr>
|
|
<tr><td><a href="../../../doctrine/orm/mapping/associationmapping.html#FETCH_EAGER">FETCH_EAGER</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#FETCH_LAZY">FETCH_LAZY</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#declared">declared</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#fetchMode">fetchMode</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#inherited">inherited</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#inversedBy">inversedBy</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isCascadeDetach">isCascadeDetach</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isCascadeMerge">isCascadeMerge</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isCascadePersist">isCascadePersist</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isCascadeRefresh">isCascadeRefresh</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isCascadeRemove">isCascadeRemove</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isOwningSide">isOwningSide</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#joinTable">joinTable</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#mappedBy">mappedBy</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#sourceEntityName">sourceEntityName</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#sourceFieldName">sourceFieldName</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#targetEntityName">targetEntityName</a></td></tr></table>
|
|
|
|
<table id="summary_method">
|
|
<tr><th colspan="2">Method Summary</th></tr>
|
|
<tr>
|
|
<td class="type"> boolean</td>
|
|
<td class="description"><p class="name"><a href="#isOneToOne()">isOneToOne</a>()</p><p class="description">{@inheritdoc}</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> void</td>
|
|
<td class="description"><p class="name"><a href="#load()">load</a>(object sourceEntity, object targetEntity, <a href="../../../doctrine/orm/entitymanager.html">EntityManager</a> em, array joinColumnValues, object target)</p><p class="description">{@inheritdoc}</p></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="inherit">
|
|
<tr><th colspan="2">Methods inherited from Doctrine\ORM\Mapping\AssociationMapping</th></tr>
|
|
<tr><td><a href="../../../doctrine/orm/mapping/associationmapping.html#getQuotedJoinTableName()">getQuotedJoinTableName</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#hasCascades()">hasCascades</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isEagerlyFetched()">isEagerlyFetched</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isLazilyFetched()">isLazilyFetched</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isManyToMany()">isManyToMany</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isOneToMany()">isOneToMany</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#isOneToOne()">isOneToOne</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#load()">load</a>, <a href="../../../doctrine/orm/mapping/associationmapping.html#usesJoinTable()">usesJoinTable</a></td></tr></table>
|
|
|
|
<h2 id="detail_field">Field Detail</h2>
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 79</div>
|
|
<h3 id="joinColumnFieldNames">joinColumnFieldNames</h3>
|
|
<code class="signature">public array <strong>$joinColumnFieldNames</strong> = array()</code>
|
|
<div class="details">
|
|
<p>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.</p></div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 71</div>
|
|
<h3 id="joinColumns">joinColumns</h3>
|
|
<code class="signature">public array <strong>$joinColumns</strong> = array()</code>
|
|
<div class="details">
|
|
<p>READ-ONLY: The join column definitions. Only present on the owning side.</p></div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 64</div>
|
|
<h3 id="orphanRemoval">orphanRemoval</h3>
|
|
<code class="signature">public boolean <strong>$orphanRemoval</strong> = false</code>
|
|
<div class="details">
|
|
<p>READ-ONLY: Whether to delete orphaned elements (when nulled out, i.e. $foo->other = null)</p></div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 50</div>
|
|
<h3 id="sourceToTargetKeyColumns">sourceToTargetKeyColumns</h3>
|
|
<code class="signature">public mixed <strong>$sourceToTargetKeyColumns</strong> = array()</code>
|
|
<div class="details">
|
|
<p>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.</p></div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 57</div>
|
|
<h3 id="targetToSourceKeyColumns">targetToSourceKeyColumns</h3>
|
|
<code class="signature">public mixed <strong>$targetToSourceKeyColumns</strong> = array()</code>
|
|
<div class="details">
|
|
<p>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.</p></div>
|
|
|
|
<hr>
|
|
|
|
<h2 id="detail_method">Method Detail</h2>
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 126</div>
|
|
<h3 id="isOneToOne()">isOneToOne</h3>
|
|
<code class="signature">public boolean <strong>isOneToOne</strong>()</code>
|
|
<div class="details">
|
|
<p></p><dl>
|
|
<dt>Override.</dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/ORM/Mapping/OneToOneMapping.php at line 139</div>
|
|
<h3 id="load()">load</h3>
|
|
<code class="signature">public void <strong>load</strong>(object sourceEntity, object targetEntity, <a href="../../../doctrine/orm/entitymanager.html">EntityManager</a> em, array joinColumnValues, object target)</code>
|
|
<div class="details">
|
|
<p></p><dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>sourceEntity - the entity source of this association</dd>
|
|
<dd>targetEntity - the entity to load data in</dd>
|
|
<dd></dd>
|
|
<dd>joinColumnValues - Values of the join columns of $sourceEntity.</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="header">
|
|
<h1>Doctrine</h1>
|
|
<ul>
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="../../../doctrine/orm/mapping/package-summary.html">Namespace</a></li>
|
|
<li class="active">Class</li>
|
|
<li><a href="../../../doctrine/orm/mapping/package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-all.html">Index</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="small_links">
|
|
<a href="../../../index.html" target="_top">Frames</a>
|
|
<a href="../../../doctrine/orm/mapping/onetoonemapping.html" target="_top">No frames</a>
|
|
</div>
|
|
<div class="small_links">
|
|
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
</div>
|
|
<hr>
|
|
|
|
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
|
|
|
|
</body>
|
|
|
|
</html> |