Skip to content
Advertisement

Tag: entities

Doctrine – Add default time stamp to entity like NOW()

Following the Doctrine guidelines I understand how to set a default value for an Entity, but what if I wanted a date/time stamp? http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/faq.html My problem is my database has a default of NOW() on a field but when I use Doctrine to insert a record the values are null or blank but the rest of the insert happened. Also

Advertisement