So we are converting our
Java domain objects into Groovy and came across an issue that I hope someone has resolved.
Our class has a property that is of type java.sql.Date
This was working as a .java class, but as a .groovy it does not.
Here is what happens.
This domain object gets set into the Model that is attached to a JSONView object and returned to a web page. JSON has this great feature that it calls every single getter method of objects returned in the Model. Which means it is calling .getHours() in that Date property. The current implementation of getHours() is just
throw new IllegalArgumentException();
So, now as a groovy object the page gets this exception and won't display. As a java object it all works perfectly, no exception.
Thanks
Mark