[coldbox-3.5.0] criteria builder + isGE() + date values


var summaries = getSummaryService() .newCriteria()

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

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()

Yea, unfortunately, almost all operations via criteria builders might need casting depending on the db datatype and that fluctuates per database, so it would be your job to send in the right casts, unless we can grow the criteria builder and make it smarter, thoughts?

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

i say make it smarter. perhaps introspect the column’s datatype and cast the value accordingly.

ill take a peak and see whats up.