1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Merge pull request #1396 from Padam87/embeddable_docs

[Documentation] Initializing embeddables doc
This commit is contained in:
Marco Pivetta 2015-12-11 20:24:44 +01:00
commit 0a1fa8920e

View File

@ -76,6 +76,20 @@ In terms of your database schema, Doctrine will automatically inline all
columns from the ``Address`` class into the table of the ``User`` class,
just as if you had declared them directly there.
Initializing embeddables
------------------------
In case all fields in the embeddable are ``nullable``, you might want
to initialize the embeddable, to avoid getting a null value instead of
the embedded object.
.. code-block:: php
public function __construct()
{
$this->address = new Address();
}
Column Prefixing
----------------