LexikTranslationBundle icon indicating copy to clipboard operation
LexikTranslationBundle copied to clipboard

Add missing timestamp properties to the File model

Open adamelso opened this issue 9 years ago • 1 comments

When I tried to add this bundle to a project, Doctrine was complaining that the createdAt property does not exist on the File entity.

The pre-persist and pre-update hooks attempts to set createdAt and updatedAt to the current datetime, but these properties are not declared, nor are they mapped. The pull request fixes that.

Note that I've made them nullable because surprisingly no-one has reported this as an issue yet, so I wanted to keep some backwards compatibility.

adamelso avatar Nov 21 '15 14:11 adamelso

Hi, thanks to point that out, but maybe we should just remove these pre-persist and pre-update hooks. The dates are not use in the current process, and if we add them to the Doctrine ORM mapping, we also need to map them for Doctrine ODM and Propel to be consistent.

cedric-g avatar Dec 02 '15 08:12 cedric-g