Automatic values for updated_at, created_at in Doctrine
问题 I want to make fields updated_at and created_at in my Doctrine entities to update automatically. In Ruby on Rails models there are 2 fields: updated_at and created_at . Description can be found here: http://guides.rubyonrails.org/migrations.html#migration-overview: The timestamps macro adds two columns, created_at and updated_at. These special columns are automatically managed by Active Record if they exist. Can I enable similar functionality in Doctrine 2? 回答1: You can call $this-