Re: Cayenne 1.2 + PostgreSQL

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Dec 13 2005 - 10:26:05 EST

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-407) JOINT_PREFETCH_SEMANTICS + in-memory DISTINCT = incorrect results"

    On Dec 13, 2005, at 6:15 PM, Gentry, Michael ((Contractor)) wrote:

    > SybaseAdatper (which I
    > put in a separate package) and override the createPkGenerator() method
    > to instantiate my new PK class. I also had to copy types.xml and
    > create
    > my new PK class.

    AFAIK you no longer need to do that - Cayenne will walk up the
    inheritance tree to locate types.xml in the superlcass. We may need
    to double-check that and update the instructions for new adapters.

    > If we could change the modeler to allow specifying a custom PK
    > class and
    > then modify the adapter code to instantiate it, that would be super.
    > Then you could specify a PostgreSQL (or any other DB) PK generator
    > that
    > used the old table way or the new sequence way.

    Let me explain one more reason why I wasn't psyched about entering a
    custom generator in the Modeler, and still think that keeping it
    together with adapter is a good idea... There are logical PK
    generator types (lookup table, sequence, stored procedure) and there
    are adapter-specific implementations of those types.

    In other words it is very unlikely that you'll be able to reuse a
    generator you've designed for Sybase on Oracle, making your custom
    generator adapter-specific anyways.

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Dec 13 2005 - 10:26:08 EST