G
G
grabbee2016-03-17 04:38:21
symfony
grabbee, 2016-03-17 04:38:21

Doctrine not starting PrePersist when loading fixtures?

I try to load fictitious data - creation dates are written in @ORM\PrePersist in entities - but neither dates nor other data from this block are set, as if it does not exist at all. Data is saved to the entity only directly from fixtures. Why is this happening, is it normal?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BoShurik, 2016-03-17
@grabbee

Did you forget to add an annotation to the class?
@ORM\HasLifecycleCallbacks()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question