cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Date cast exception due to relationship
Date Thu, 12 Jul 2012 09:14:41 GMT
I have an Activity table and associated class containing a sql.Date field.

I also have a Results table (also with a date field) and associated
ActivityResults class.

At this point the model works without error.

However when i create a 1-M relationship, using Cayenne modeler, in
Activity to ActivityResults (partly based on the date fields) then i get
an util.Date to sql.Date cast exception in the _Activity class here:

return (Date)readProperty("activityDate");

It seems as though the relationship is causing Cayenne to switch
internally from creating a sql.Date to a util.Date ?  This is then
returned by readProperty() and causes the cast exception because _Activity
is expecting a sql.Date

This behavior occurs in 3.0.2 and in 3.1b1

View raw message