Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doctrine/lifecycle_callbacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ callbacks. This is not necessary if you're using YAML or XML for your mapping.

.. code-block:: php-annotations

// src/AppBundle/Entity/Product.php
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
* @ORM\HasLifecycleCallbacks()
Expand All @@ -33,6 +36,7 @@ the current date, only when the entity is first persisted (i.e. inserted):
.. code-block:: php-annotations

// src/AppBundle/Entity/Product.php
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\PrePersist
Expand Down