Re: [BUG] ORACLE sequence numbers not incrementing....

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Sep 11 2003 - 15:43:42 EDT

  • Next message: Mike Kienenberger: "Re: [BUG] ORACLE sequence numbers not incrementing...."

    I don't agree. This is not a bug by any definition. Cayenne PK
    generation mechanism is not tied to sequences, this is just how it is
    implemented for Oracle and DB2. Other adapters use different approach.
    So any terminology that Oracle might be using for they stuff has
    nothing to do with Cayenne. From Cayenne perspective cache size is
    exactly what it is - the number of PKs that can be assigned to a given
    entity without a trip to database.

    Also the part with customizing cache size and mechanism will likely be
    reworked in 1.1 to make it more flexible. As a part of this effort I
    was thinking about changing the Modeler labels depending on the target
    mechanism, instead of using generic Cayenne terminology for all of
    them. This is where your comments would apply.

    Andrus

    On Thursday, September 11, 2003, at 03:01 PM, Mike Kienenberger wrote:

    > You may disagree with me on this, but I'm going to call the following
    > a bug.
    >
    > What Cayenne's XML refers to as "db-key-cache-size" and what the
    > modeler
    > refers to as "cached pk size" is really "db-key-increment."
    >
    > This value is only used in reference to Oracle sequences, and Oracle
    > sequences have a "cache size" property in addition to an "increment by"
    > property. From what I can tell reading through the
    > OraclePKGenerator.java
    > file, the "db-key-cache-size" value is only used for the "increment by"
    > value, and not for the "cache size". At best this is highly
    > confusing and
    > misleading. At worse, I'll call it a bug :)
    >
    > Along with that, the default value is "20" which is the default value
    > for an
    > Oracle cache_size, while the default value for an Oracle sequence
    > increment_by is 1, which only reinforces the misconception (as well as
    > makes
    > it incompatible by default with existing database frameworks' default
    > increment_by [EOF/Toplink]).
    >
    > I think it's important to correct this misleading nomenclature before
    > it
    > becomes a conflicting grandfathered-in Cayenne "standard."
    >
    > Maybe we can rename it to "db-key-sequence-cache-size" and
    > "db-key-sequence-increment-by" and depreciate "db-key-cache-size."
    > That's
    > not ideal, but it might be too late to change the meaning of
    > "db-key-cache-size" to be what it means in other contexts.
    >
    > Comments?
    >
    > -Mike



    This archive was generated by hypermail 2.0.0 : Thu Sep 11 2003 - 15:40:23 EDT