1
date 용 created_at 및 updated_at 필드가있는 symfony 양식이 있습니다. 하지만이 필드를 기본값으로 채우고 양식이 표시 될 때 표시되지 않도록하려고합니다. 따라서 created_at는 새 데이터를 삽입 할 때 현재 시간을 유지하고 updated_at는 데이터를 업데이트 할 때 현재 날짜를 보유합니다.Doctrine 양식의 created_at 및 updated_at 필드에 대한 기본 날짜 설정
하지만 doctrine도 사용해야합니까? doctrine도 마술을해야합니까? – sparrow
나는 propel guy이지만 Timestampable 행동 문서를 읽을 수있는 한, 그렇습니다. http://www.doctrine-project.org/documentation/manual/1_2/en/behaviors#core-behaviors:timestampable – Maerlyn
@sparrow, @maerlyn이 맞습니다.이 필드의 설정을 해제하면 Timestampable 템플릿이 당신을위한 일. 나는 지난 1.5 년 동안 동료 교리 사용자입니다. – develop7