Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Behaviors
-
Labels:None
-
Environment:PHP 5.3.1
Symfony 1.4.6
Doctrine 1.2.2
Description
When I add behavior "Timestampable" to my model, and then use "doctrine:generate-admin" to this model class.
When I add an entity to this table everything is ok.
But if I edit this entry – created_at field become empty (0000-00-00 00:00:00)
I even does not use this fields at my generator.yml
config:
actions: ~
fields:
name:
content:
list:
display: [name, content]
filter:
class: false
form:
display: [name, content]
edit: ~
new: ~
But at form class of this model I set unrequired both Timestampable behavior fields (created_at, updated_at)
public function configure()
because of this fields is required by default, I think behavior fields should be unrequired and ORM should handle it transparently, without user`s intervention
Hi, please report potential Symfony issues on http://trac.symfony-project.org. To answer your question, you need to unset the widgets from the form and remove them completely if you don't want them there.