i am trying to save a date in a oracle database using Symfony and Doctrine, but it gives me an error:
DriverException An exception occurred while executing a query: ORA-01861
i tried to set it as a string, set it as a datetime and date, nothing seemed to work, the only solution i found was to set an oracle listener inside my services:
oracle.listener:
class: Doctrine\DBAL\Event\Listeners\OracleSessionInit
tags:
- { name: doctrine.event_listener, event: postConnect }
the problem is, this listener is deprecated, soi should not be using it, but i don't seem to find a propper solution for it. my oracle database default for dates is: "DD-MON-RR".
i tried setting the entity field to date, datetime and time, i tried to pass a different string or object to the field setter, but nothing worked, the only thing that helped was that deprecated Listener