Doctrine2 ORM does not save changes to a DateTime field

后端 未结 3 789
悲哀的现实
悲哀的现实 2020-11-30 06:58

I have a User entity:

use Doctrine\\ORM\\Mapping as ORM;

/**
 * ExampleBundle\\Entity\\User
 *
 * @ORM\\Entity()
          


        
3条回答
  •  隐瞒了意图╮
    2020-11-30 07:25

    Consider using DateTimeImmutable class for your date/time properties. Thereby, note that DateTimeImmutable is not an instance of DateTime.

提交回复
热议问题