Hello ,
i use hib2
i set my dialect to oracle dialect
i use oracle 9i
i just strated using hibernate and i was reading the dialect stuff.
then i met a problem and want to ask you this:
i have the following snippet , in that snippet i formatted the date string to
conform to oracle date format.
--------------------------------------------------------------
Date nextdate= new Date(kayittarih.getTime());
Date prevday= new Date(kayittarih.getTime());
SimpleDateFormat fmt = new SimpleDateFormat("dd-MMM-yy");
return getHibernateTemplate().find("from Evrak u"
+ " where " + QUERY_IS_ACTIVE +
" and u.createtime < '" +fmt.format(prevdate)+"'"+
" and u.createtime > '" +fmt.format(nextday)+"'" );
------------------------------------------------------------------------------------
what are the alternatives that fits best to my desire to get rid of that kind of coding formatting?
and some questions :
-is it rational to configure oracle ? what if i port my application to another oracle server--i will have to configure every time.
--isn't it an issue that Oracle dialect should handle? (if i understand the concept of diaelect correctly)
Thank you,,
|