Re: NUMERIC default scale behaves differently on Derby & SQL Server

From: Øyvind Harboe (oyvind.harbo..ylin.com)
Date: Sat Aug 09 2008 - 04:17:02 EDT

  • Next message: Øyvind Harboe: "Re: NUMERIC default scale behaves differently on Derby & SQL Server"

    On Fri, Aug 8, 2008 at 8:28 PM, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Here is a potential hole. By default (unless ExtendedType is explicitly
    > defined for a given Java class), Cayenne does the following JDBC calls:
    >
    > PreparedStatement st = ..
    > if (scale != -1) {
    > st.setObject(pos, val, type, scale);
    > }
    > else {
    > st.setObject(pos, val, type);
    > }
    >
    > Looks correct from the JDBC standpoint, but from my experience some drivers
    > may have it all wrong, and inconsistent with a corresponding
    > 'setSpecificType(..)' method for a given object class. So what is the class
    > of the object parameter? BigDecimal? Something else?

    BigDecimal.

    -- 
    Øyvind Harboe
    http://www.zylin.com/zy1000.html
    ARM7 ARM9 XScale Cortex
    JTAG debugger and flash programmer
    



    This archive was generated by hypermail 2.0.0 : Sat Aug 09 2008 - 04:17:40 EDT