Thank you! Yes, you have; I went right by it. Thanks again.
Best, Laird On Thu, Jul 9, 2009 at 2:36 PM, Michael Dick (via Nabble) < [email protected]<ml-user%[email protected]> > wrote: > Hi Laird > > I forgot to add this bit, it *is* in the manual, but it's easier to find > once you know what you're looking for. > > Link to the relevant section : > > http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_mapping_jpa_constraints > > It's something we can expand on though, maybe an example would help? > > Hope this helps (assuming I've understood the question), > > -mike > > On Thu, Jul 9, 2009 at 1:32 PM, Michael Dick > <michael.d.d...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3233323&i=0>>wrote: > > > > I think you're looking for the org.apache.openjpa.persistence.jdbc.Index > > annotation : > > ex : > > import org.apache.openjpa.persistence.jdbc.Index; > > > > @Entity > > public class Person { > > . . . > > @Index > > private int myint; > > . . . > > } > > > > SQL generation (DB2) : > > 3786 laird TRACE [main] openjpa.jdbc.SQL - <t 9105104, conn 16916276> > > executing stmnt 17226426 CREATE TABLE Person (id INTEGER NOT NULL, > firstName > > VARCHAR(254), lastName VARCHAR(254), myint INTEGER, version INTEGER, > PRIMARY > > KEY (id)) > > 3962 laird TRACE [main] openjpa.jdbc.SQL - <t 9105104, conn 16916276> > > [176 ms] spent > > 3971 laird TRACE [main] openjpa.jdbc.SQL - <t 9105104, conn 23361497> > > executing stmnt 17711949 CREATE INDEX I_PERSON_MYINT ON Person (myint) > > > > -mike > > > > > > On Thu, Jul 9, 2009 at 11:30 AM, Laird Nelson > > <ljnel...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3233323&i=1>> > wrote: > > > >> Is it possible to define a non-unique index in OpenJPA? Hibernate > offers > >> the @Index annotation to do this as part of its DDL generation > machinery. > >> > >> My apologies if this was mentioned; I didn't see it in > >> http://openjpa.apache.org/builds/latest/docs/manual/manual.html. > >> > >> Thanks, > >> Laird > >> > > > > > > > ------------------------------ > View message @ http://n2.nabble.com/Define-index--tp3232593p3233323.html > To start a new topic under OpenJPA Users, email > [email protected]<ml-node%[email protected]> > To unsubscribe from OpenJPA Users, click here< (link removed) =>. > > > -- View this message in context: http://n2.nabble.com/Define-index--tp3232593p3233483.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
