Merge pull request #5813 from jeanCarloMachado/issue_5786
Add embedded and embeddable annotations in annotations reference index
This commit is contained in:
commit
1c2b7c9685
@ -39,6 +39,8 @@ Index
|
|||||||
- :ref:`@ChangeTrackingPolicy <annref_changetrackingpolicy>`
|
- :ref:`@ChangeTrackingPolicy <annref_changetrackingpolicy>`
|
||||||
- :ref:`@DiscriminatorColumn <annref_discriminatorcolumn>`
|
- :ref:`@DiscriminatorColumn <annref_discriminatorcolumn>`
|
||||||
- :ref:`@DiscriminatorMap <annref_discriminatormap>`
|
- :ref:`@DiscriminatorMap <annref_discriminatormap>`
|
||||||
|
- :ref:`@Embeddable <annref_embeddable>`
|
||||||
|
- :ref:`@Embedded <annref_embedded>`
|
||||||
- :ref:`@Entity <annref_entity>`
|
- :ref:`@Entity <annref_entity>`
|
||||||
- :ref:`@EntityResult <annref_entity_result>`
|
- :ref:`@EntityResult <annref_entity_result>`
|
||||||
- :ref:`@FieldResult <annref_field_result>`
|
- :ref:`@FieldResult <annref_field_result>`
|
||||||
@ -282,6 +284,67 @@ depending on whether the classes are in the namespace or not.
|
|||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.. _annref_embeddable:
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The embeddable is required on an entity targed to be embeddable inside
|
||||||
|
another. It works together with the :ref:`@Embedded <annref_embedded>`
|
||||||
|
annotation to establish the relationship between two entities.
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Embeddable
|
||||||
|
*/
|
||||||
|
class Address
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
class User
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @Embedded(class = "Address")
|
||||||
|
*/
|
||||||
|
private $address;
|
||||||
|
|
||||||
|
|
||||||
|
.. _annref_embedded:
|
||||||
|
|
||||||
|
@Embedded
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The embedded annotation is required on a member class varible targed to
|
||||||
|
embed it's class argument inside it's own class.
|
||||||
|
|
||||||
|
Required attributes:
|
||||||
|
|
||||||
|
- **class**: The embeddable class
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// ...
|
||||||
|
class User
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @Embedded(class = "Address")
|
||||||
|
*/
|
||||||
|
private $address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Embeddable
|
||||||
|
*/
|
||||||
|
class Address
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
|
|
||||||
.. _annref_entity:
|
.. _annref_entity:
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user