Re: Cayenne presentation by Michael Sacket

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Oct 06 2004 - 12:12:12 EDT

  • Next message: Budhiraja, Nikhil: "Expression toString... Possible bug"

    > On Sep 29, 2004, at 2:44 PM, Mike Kienenberger wrote:
    > > I'm planning on writing a message to support at OpenBase to work out a
    > > way
    > > to make optimistic locking work between Cayenne and OpenBase on
    > > timestamp
    > > columns, so having had an active Openbase/Cayenne presentation at the
    > > first
    > > OpenBase conference is bound to help :)

    Michael Sacket <msacke..ammastream.com> wrote:
    > Could you describe what the locking problem is?

    Just what you've probably already seen on the OpenBase Dev mailing list.
    The TIMESTAMP (not to be confused with the DATETIME) OpenBase type cannot
    currently be used for optimistic locking from Java. To summarize Scott,
    TIMESTAMP fractional section representation is a fraction represented to 8
    places as a float/double and this doesn't map well to Java time classes
    which represent integral milliseconds and nanoseconds. Because of the
    rounding, the value stored in the db isn't the same as the value sent to the
    db.

    I believe the best solution would be to find a way to avoid that rounding
    problem in the JDBC driver somehow (maybe pre-round any timestamps so
    database comparisions always work), but I haven't had time to pursue it
    since Scott, Norman, and I have spent the majority of our conversations over
    the last few days trying to get OpenBase 8.0.4 working on my Windows system
    (8.0.2 works fine here. 8.0.4 works fine my older Celeron 400, but 8.0.4
    won't work on my P4).

    -Mike



    This archive was generated by hypermail 2.0.0 : Wed Oct 06 2004 - 12:11:18 EDT