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

Initializing embeddables doc

This commit is contained in:
Adam Prager 2015-04-27 17:23:40 +02:00
parent 71d134fcc0
commit 961bff6a80

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
----------------