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

From: Michael Gentry (Yes, I'm a Contractor) ("Michael)
Date: Fri Jul 08 2005 - 15:11:50 EDT

  • Next message: Kevin Menard: "Re: SelectQuery and table that is synonym"

    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 : Fri Jul 08 2005 - 15:11:53 EDT