Re: How do I use the Modeler to define a non key field as unique?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Jul 11 2005 - 02:03:43 EDT

  • Next message: Joseph Hannon: "Re: How do I use the Modeler to define a non key field as unique?"

    Joseph,

    As others have mentioned, you can simply ignore the fact that a given
    column has a "unique" constraint. This info is not relevant to
    Cayenne, so the only inconvenience it is going to cause is that you'd
    have to manually add this constraint outside of the Modeler, e.g. via
    SQLPlus or some Oracle admin tool.

    Andrus

    On Jul 8, 2005, at 11:11 PM, Michael Gentry (Yes, I'm a Contractor)
    wrote:

    > In the Picard DbEntity section of Cayenne Modeler (the icon with three
    > stacked grey rectangles), select the Attributes tab. For your OID,
    > check
    > the "PK" column checkbox, but don't check that one for your FOO_BAR.
    >
    > /dev/mrg
    >
    >
    >
    >> From: Joseph Hannon <jah.volcan..mail.com>
    >> Reply-To: <cayenne-use..bjectstyle.org>
    >> Date: Fri, 8 Jul 2005 13:48:15 -0500
    >> To: <cayenne-use..bjectstyle.org>
    >> Subject: How do I use the Modeler to define a non key field as
    >> unique?
    >>
    >> I formerly used Hibernate as my orm framework and have switched over
    >> to Cayenne 1.2M4 to try it out. I am running a Fedora Core 3 Linux
    >> box
    >> for development. I have been working with the modeler tool and
    >> gotten
    >> some simple schemas and classes to work. I am used to writing my own
    >> schemas by hand and would commonly write the following inside a
    >> create
    >> table script for Oracle:
    >>
    >> create table PICARD
    >> (
    >> OID integer primary key,
    >> FOO_BAR varchar2(100) not null unique
    >> ) ;
    >>
    >> PICARD.OID is the PK and PICARD.FOO_BAR is just unique. What I don't
    >> want is for OID and FOO_BAR to be a composite key. How would I do
    >> this using the modeler?
    >>
    >> Thanks,
    >> Joseph
    >>
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Jul 11 2005 - 02:03:44 EDT