mysql - Issue handling dates in doctrine php -


i having issue date format issue. using mysql, doctrine2, , php 5.3.

the issue when query database getrepository('entity\\srm').findby($id) end negative date value of: -0001-11-30 00:00:00.

the value store in database 0000-00-00. datatype of field in mysql date.

the doctrine entity has variable identified date type.

i have done tons of searching , no leads.

any ideas?

thanks

if can alter database, add nullable attribute on column , replace 0000-00-00 values null.

else, need implement custom type: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/advanced-field-value-conversion-using-custom-mapping-types.html


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -