database - Null result for date object fetched from DB giving sysDate/current date on mapping to Java object -


i fetched data oracle database through java code using query similar below:

select min(specdate) table

the result supposed of type date.

since there no specdate populated of rows in table, result null.

i used query in java code , mapped date object using beanpropertyrowmapper.

the result got after mapping system date or current date.

not sure why mapper returned current date instead of null.

found reason.

when beanpropertyrowmapper provided date.class mapping, new date() called instantiation of class object.

but date.class, new date() returns sysdate.


Comments