1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Update mapping documentation for schema support

Updated documentation:

* Annotations
* XML
* Yaml
* PHP
This commit is contained in:
Michaël Perrin 2014-01-15 12:22:59 +01:00 committed by Marco Pivetta
parent 54b3c0548d
commit 0dbc6a12ee
4 changed files with 6 additions and 1 deletions

View File

@ -1129,6 +1129,7 @@ Optional attributes:
- **indexes**: Array of @Index annotations
- **uniqueConstraints**: Array of @UniqueConstraint annotations.
- **schema**: (>= 2.5) Name of the schema the table lies in.
Example:
@ -1140,6 +1141,7 @@ Example:
* @Table(name="user",
* uniqueConstraints={@UniqueConstraint(name="user_unique",columns={"username"})},
* indexes={@Index(name="user_idx", columns={"email"})}
* schema="schema_name"
* )
*/
class User { }

View File

@ -241,6 +241,7 @@ General Getters
- ``getTableName()``
- ``getSchemaName()``
- ``getTemporaryIdTableName()``
Identifier Getters

View File

@ -187,7 +187,7 @@ specified as the ``<entity />`` element as a direct child of the
.. code-block:: xml
<doctrine-mapping>
<entity name="MyProject\User" table="cms_users" repository-class="MyProject\UserRepository">
<entity name="MyProject\User" table="cms_users" schema="schema_name" repository-class="MyProject\UserRepository">
<!-- definition here -->
</entity>
</doctrine-mapping>
@ -211,6 +211,7 @@ Optional attributes:
- **read-only** - (>= 2.1) Specifies that this entity is marked as read only and not
considered for change-tracking. Entities of this type can be persisted
and removed though.
- **schema** - (>= 2.5) The schema the table lies in, for platforms that support schemas
Defining Fields
~~~~~~~~~~~~~~~

View File

@ -74,6 +74,7 @@ of several common elements:
type: entity
repositoryClass: Doctrine\Tests\ORM\Mapping\UserRepository
table: cms_users
schema: schema_name # The schema the table lies in, for platforms that support schemas (Optional, >= 2.5)
readOnly: true
indexes:
name_index: