This was originally reported on cayenne-user:
On Nov 28, 2003, at 1:19 PM, Leonardo R. Nunes wrote:
I have a column X Numeric in my database and in my objEntity, I mapped an attribute of the type Long for this column.
I'm doing a SQLQuery and using the method objectFromDataRow, but the type of the attribute of the object returned in the query is BigDecimal instead of Long.
Is this a bug ?
It likely is - when the data is fetched as a raw row, all Java values are read using Cayenne default JDBC->Java mapping. So when later converting a data row to an object, the wrong type maybe used - something that does not happen when an object is created during the query.