Permalink
Browse files

Added some info about the nullable attribute

  • Loading branch information...
1 parent a19e99e commit 1abe1657e73e35304557c6cbc68205f54784b895 @wjzijderveld wjzijderveld committed Mar 12, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 en/reference/annotations-reference.rst
View
9 en/reference/annotations-reference.rst
@@ -148,6 +148,8 @@ Common optional attributes:
See :ref:`Mapping multivalue properties <basicmapping_mappingmultivalueproperties>`.
- **translated**: ``true`` to specify that the property should be translatable, requires the
``translator`` attribute to be specified in :ref:`@Document<annref_document>`.
+- **nullable**: ``true`` to specifiy that this property doesn't have a required value, used
+ when loading a translation, to allow loading a node with a missing translated property.
Examples:
@@ -156,11 +158,16 @@ Examples:
<?php
/**
- * @String()
+ * @String(translated=true)
*/
protected $title;
/**
+ * @String(translated=true, nullable=true)
+ */
+ protected $subTitle;
+
+ /**
* @Boolean()
*/
protected $enabled;

0 comments on commit 1abe165

Please sign in to comment.