Fw: Key generator question

From: Andriy Shapochka (ashapochk..otmail.com)
Date: Tue Mar 04 2003 - 16:37:28 EST

  • Next message: Fabricio Voznika: "Re: Key generator question"

    > Ops, I missed this list somehow.
    > This feature is not integrated into our modeler. Still, added to a data
    map
    > manually, the xml generator configuration will not be lost in case you
    open,
    > modify, and save the data map in the Modeler later.Otherwise it is fully
    > supported and works in Cayenne. In my own project I am working with custom
    > sequences only. Here is an extract from one of the field data maps:
    >
    > <db-entity name="REQ_GRAPH">
    > <db-attribute name="ELEMENT_ID" type="INTEGER" isMandatory="true"/>
    > <db-attribute name="REQ_GRAPH_ID" type="INTEGER" isPrimaryKey="true"
    > isMandatory="true"/>
    > <db-key-generator>
    > <db-generator-type>ORACLE</db-generator-type>
    > <db-generator-name>REQ_GRAPH_SEQ</db-generator-name>
    > <db-key-cache-size>5</db-key-cache-size>
    > </db-key-generator>
    > </db-entity>
    >
    > To see how the job is done please have a look at
    > OraclePkGenerator.pkFromDatabase(DataNode node, DbEntity ent);
    > The code in it gives preference to a db-key-generator configured in the
    > DbEntity and in case the generator has not been found falls back to the
    > Cayenne classic pk generation method. To configure your sequences please
    > follow the guidelines in data-map.dtd
    >
    > Andriy.
    >
    > ----- Original Message -----
    > From: "Andrus Adamchik" <andru..bjectstyle.org>
    > To: <fabricio.voznik..artmouth.EDU>; <ashapochka@hotmail.com>
    > Cc: <cayenne-use..bjectstyle.org>
    > Sent: Tuesday, March 04, 2003 10:20 PM
    > Subject: Re: Key generator question
    >
    >
    > > One of our committers, Andriy, implemented that feature recently. It may
    > > not be fully integrated yet and is probably not supported by the
    modeler.
    > > Andriy, can you comment on that?
    > >
    > > Andrus
    > >
    > > P.S. Andriy, you might want to subscribe to to cayenne-user, your recent
    > > additions are in really high demand ;-)
    > >
    > >
    > > > Hi,
    > > >
    > > > Does anyone know if it's possible to use a custom oracle sequence
    to
    > > > generate PKs? The following lines were extracted from data-map.dtd:
    > > >
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Mar 04 2003 - 16:36:18 EST