Hi, I've got a mapping from a .NET DateTime type to an Oracle Date type. Reading the object converts perfectly the oracle date to .Net datetime...
but I have problems with update and insert statements.
Basically, the SQL that gets generated looks like this...
update my_table set date_column = 26/01/1998 00:00:00 where ...
Note that not even quotes are placed around the date value. This is not recognized by oracle. I'm new to oracle as well, but the only way I found out to update a date field in oracle would be something like (correct me if I'm wrong but that's what my collegues are telling, all Oracle developers):
set date_column = to_date('26/01/1998 00:00:00', 'DD/MM/yyyy HH:MI:SS')
What mapping do I need to use to obtain a correct update and insert statement with DateTime in Oracle. I'm sure there should be a simple default implementation.
I'm using NHibernate 2.1 with the Oracle10gDialect.
Thanks
|