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

From: Joseph Hannon (jah.volcan..mail.com)
Date: Mon Jul 11 2005 - 11:00:54 EDT

  • Next message: Michael Gentry (Yes, I'm a Contractor): "Re: How do I use the Modeler to define a non key field as unique?"

    Thanks for the replies! I was describing to a friend of how I was
    getting used to posting to the Hibernate list and receive no response.
     Here, I have three already.

    I am new to Cayenne and was under the impression that the modeler tool
    would construct my relationships and build the DB for me. So I see
    now that I will model the relationships and then build my DB using
    another tool.

    Regards,
    Joseph

    On 7/11/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > 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 - 11:01:00 EDT