this:
var summaries = getSummaryService() .newCriteria()
.isIn(“insco”,arguments.inscoCodes)
.isGE(“date_completed”,“1/1/2012”)
.isLE(“date_completed”,“4/1/2012”)
.list(asQuery=true);
throws this:
An Unhandled Exception Occurred
An unhandled exception has occurred. Please look at the diagnostic information below:
Type java.lang.ClassCastException
Message java.lang.String cannot be cast to java.util.Date
Detail
Extended Info
Message java.lang.String cannot be cast to java.util.Date
Tag Context C:\inetpub\Frameworks\coldbox\coldbox_3_5\system\orm\hibernate\CriteriaBuilder.cfc (161)
this works:
var summaries = getSummaryService().newCriteria()
.isIn(“insco”,arguments.inscoCodes)
.isGE(“date_completed”,parseDateTime(“1/1/2012”))
.isLE(“date_completed”,parseDateTime(“4/1/2012”))
.list(asQuery=true);