Permalink
Browse files

Merge pull request #22 from wjzijderveld/nullable-annotation-info

Added some info about the nullable attribute
  • Loading branch information...
2 parents a19e99e + 1abe165 commit aa200fa75a4a5e17c69520b49d902a123d91ca09 @dbu dbu committed Mar 13, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 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 aa200fa

Please sign in to comment.