How to use Doctrine OracleSessionInit listener with Symfony2?

前端 未结 3 1641
天涯浪人
天涯浪人 2021-02-07 10:21

I am using oracle and I am recieving this error:

Could not convert database value \"17-NOV-11 12.17.33 AM\" to Doctrine Type datetime. Expected format: Y-

3条回答
  •  遇见更好的自我
    2021-02-07 10:34

    I think this link will help you :

    Connecting to Oracle with Symfony2 and Doctrine 2.

    1. Map Oracle's DATE type to Doctrine's "date" type instead of "datetime" for Oracle driver
    2. Properly configures Doctrine to use most common Oracle Date and DateTime environment configurations. You may or may not need this. Check your Oracle server configuration

    https://gist.github.com/johnkary/6481664#file-oracledoctrinetypemappinglistener-php

提交回复
热议问题