Merge branch 'master' of github.com:doctrine/doctrine2
This commit is contained in:
commit
6f622ab1f7
@ -222,11 +222,11 @@ Optional attributes:
|
|||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The discriminator map is a required annotation on the
|
The discriminator map is a required annotation on the
|
||||||
top-most/super class in an inheritance hierarchy. It takes an array
|
topmost/super class in an inheritance hierarchy. Its only argument is an
|
||||||
as only argument which defines which class should be saved under
|
array which defines which class should be saved under
|
||||||
which name in the database. Keys are the database value and values
|
which name in the database. Keys are the database value and values
|
||||||
are the classes, either as fully- or as unqualified class names
|
are the classes, either as fully- or as unqualified class names
|
||||||
depending if the classes are in the namespace or not.
|
depending on whether the classes are in the namespace or not.
|
||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
@ -247,8 +247,8 @@ depending if the classes are in the namespace or not.
|
|||||||
@Entity
|
@Entity
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
Required annotation to mark a PHP class as Entity. Doctrine manages
|
Required annotation to mark a PHP class as an entity. Doctrine manages
|
||||||
the persistence of all classes marked as entity.
|
the persistence of all classes marked as entities.
|
||||||
|
|
||||||
Optional attributes:
|
Optional attributes:
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ Example:
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Annotation which has to be set on the entity-class PHP DocBlock to
|
Annotation which has to be set on the entity-class PHP DocBlock to
|
||||||
notify Doctrine that this entity has entity life-cycle callback
|
notify Doctrine that this entity has entity lifecycle callback
|
||||||
annotations set on at least one of its methods. Using @PostLoad,
|
annotations set on at least one of its methods. Using @PostLoad,
|
||||||
@PrePersist, @PostPersist, @PreRemove, @PostRemove, @PreUpdate or
|
@PrePersist, @PostPersist, @PreRemove, @PostRemove, @PreUpdate or
|
||||||
@PostUpdate without this marker annotation will make Doctrine
|
@PostUpdate without this marker annotation will make Doctrine
|
||||||
@ -373,7 +373,7 @@ Example:
|
|||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
Annotation is used inside the :ref:`@Table <annref_table>` annotation on
|
Annotation is used inside the :ref:`@Table <annref_table>` annotation on
|
||||||
the entity-class level. It allows to hint the SchemaTool to
|
the entity-class level. It provides a hint to the SchemaTool to
|
||||||
generate a database index on the specified table columns. It only
|
generate a database index on the specified table columns. It only
|
||||||
has meaning in the SchemaTool schema generation context.
|
has meaning in the SchemaTool schema generation context.
|
||||||
|
|
||||||
@ -467,7 +467,7 @@ Examples:
|
|||||||
This annotation is used in the context of relations in
|
This annotation is used in the context of relations in
|
||||||
:ref:`@ManyToOne <annref_manytoone>`, :ref:`@OneToOne <annref_onetoone>` fields
|
:ref:`@ManyToOne <annref_manytoone>`, :ref:`@OneToOne <annref_onetoone>` fields
|
||||||
and in the Context of :ref:`@JoinTable <annref_jointable>` nested inside
|
and in the Context of :ref:`@JoinTable <annref_jointable>` nested inside
|
||||||
a @ManyToMany. This annotation is not required. If its not
|
a @ManyToMany. This annotation is not required. If it is not
|
||||||
specified the attributes *name* and *referencedColumnName* are
|
specified the attributes *name* and *referencedColumnName* are
|
||||||
inferred from the table and primary key names.
|
inferred from the table and primary key names.
|
||||||
|
|
||||||
@ -483,15 +483,15 @@ Required attributes:
|
|||||||
Optional attributes:
|
Optional attributes:
|
||||||
|
|
||||||
|
|
||||||
- **unique**: Determines if this relation exclusive between the
|
- **unique**: Determines whether this relation is exclusive between the
|
||||||
affected entities and should be enforced so on the database
|
affected entities and should be enforced as such on the database
|
||||||
constraint level. Defaults to false.
|
constraint level. Defaults to false.
|
||||||
- **nullable**: Determine if the related entity is required, or if
|
- **nullable**: Determine whether the related entity is required, or if
|
||||||
null is an allowed state for the relation. Defaults to true.
|
null is an allowed state for the relation. Defaults to true.
|
||||||
- **onDelete**: Cascade Action (Database-level)
|
- **onDelete**: Cascade Action (Database-level)
|
||||||
- **columnDefinition**: DDL SQL snippet that starts after the column
|
- **columnDefinition**: DDL SQL snippet that starts after the column
|
||||||
name and specifies the complete (non-portable!) column definition.
|
name and specifies the complete (non-portable!) column definition.
|
||||||
This attribute allows to make use of advanced RMDBS features. Using
|
This attribute enables the use of advanced RMDBS features. Using
|
||||||
this attribute on @JoinColumn is necessary if you need slightly
|
this attribute on @JoinColumn is necessary if you need slightly
|
||||||
different column definitions for joining columns, for example
|
different column definitions for joining columns, for example
|
||||||
regarding NULL/NOT NULL defaults. However by default a
|
regarding NULL/NOT NULL defaults. However by default a
|
||||||
@ -593,7 +593,7 @@ Example:
|
|||||||
@ManyToMany
|
@ManyToMany
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Defines an instance variable holds a many-to-many relationship
|
Defines that the annotated instance variable holds a many-to-many relationship
|
||||||
between two entities. :ref:`@JoinTable <annref_jointable>` is an
|
between two entities. :ref:`@JoinTable <annref_jointable>` is an
|
||||||
additional, optional annotation that has reasonable default
|
additional, optional annotation that has reasonable default
|
||||||
configuration values using the table and names of the two related
|
configuration values using the table and names of the two related
|
||||||
@ -610,7 +610,7 @@ Optional attributes:
|
|||||||
|
|
||||||
|
|
||||||
- **mappedBy**: This option specifies the property name on the
|
- **mappedBy**: This option specifies the property name on the
|
||||||
targetEntity that is the owning side of this relation. Its a
|
targetEntity that is the owning side of this relation. It is a
|
||||||
required attribute for the inverse side of a relationship.
|
required attribute for the inverse side of a relationship.
|
||||||
- **inversedBy**: The inversedBy attribute designates the field in the
|
- **inversedBy**: The inversedBy attribute designates the field in the
|
||||||
entity that is the inverse side of the relationship.
|
entity that is the inverse side of the relationship.
|
||||||
@ -653,7 +653,7 @@ Example:
|
|||||||
@MappedSuperclass
|
@MappedSuperclass
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
An mapped superclass is an abstract or concrete class that provides
|
A mapped superclass is an abstract or concrete class that provides
|
||||||
persistent entity state and mapping information for its subclasses,
|
persistent entity state and mapping information for its subclasses,
|
||||||
but which is not itself an entity. This annotation is specified on
|
but which is not itself an entity. This annotation is specified on
|
||||||
the Class docblock and has no additional attributes.
|
the Class docblock and has no additional attributes.
|
||||||
@ -766,7 +766,7 @@ Example:
|
|||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The @OneToOne annotation works almost exactly as the
|
The @OneToOne annotation works almost exactly as the
|
||||||
:ref:`@ManyToOne <annref_manytoone>` with one additional option that can
|
:ref:`@ManyToOne <annref_manytoone>` with one additional option which can
|
||||||
be specified. The configuration defaults for
|
be specified. The configuration defaults for
|
||||||
:ref:`@JoinColumn <annref_joincolumn>` using the target entity table and
|
:ref:`@JoinColumn <annref_joincolumn>` using the target entity table and
|
||||||
primary key column names apply here too.
|
primary key column names apply here too.
|
||||||
@ -933,7 +933,7 @@ DocBlock.
|
|||||||
@SequenceGenerator
|
@SequenceGenerator
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
For the use with @GeneratedValue(strategy="SEQUENCE") this
|
For use with @GeneratedValue(strategy="SEQUENCE") this
|
||||||
annotation allows to specify details about the sequence, such as
|
annotation allows to specify details about the sequence, such as
|
||||||
the increment size and initial values of the sequence.
|
the increment size and initial values of the sequence.
|
||||||
|
|
||||||
@ -946,10 +946,10 @@ Optional attributes:
|
|||||||
|
|
||||||
|
|
||||||
- **allocationSize**: Increment the sequence by the allocation size
|
- **allocationSize**: Increment the sequence by the allocation size
|
||||||
when its fetched. A value larger than 1 allows to optimize for
|
when its fetched. A value larger than 1 allows optimization for
|
||||||
scenarios where you create more than one new entity per request.
|
scenarios where you create more than one new entity per request.
|
||||||
Defaults to 10
|
Defaults to 10
|
||||||
- **initialValue**: Where does the sequence start, defaults to 1.
|
- **initialValue**: Where the sequence starts, defaults to 1.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -1071,7 +1071,7 @@ Example:
|
|||||||
|
|
||||||
Annotation describes the table an entity is persisted in. It is
|
Annotation describes the table an entity is persisted in. It is
|
||||||
placed on the entity-class PHP DocBlock and is optional. If it is
|
placed on the entity-class PHP DocBlock and is optional. If it is
|
||||||
not specified the table name will default to the entities
|
not specified the table name will default to the entity's
|
||||||
unqualified classname.
|
unqualified classname.
|
||||||
|
|
||||||
Required attributes:
|
Required attributes:
|
||||||
|
Loading…
Reference in New Issue
Block a user