Re: Long X BigDecimal

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Nov 28 2003 - 15:10:56 EST

  • Next message: Leonardo R. Nunes: "RE: table name"

    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.

    I opened a bug report for further investigation:

       http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-45

    Thanks!
    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Nov 28 2003 - 15:11:00 EST