Should I try to add the property? or you will do it yourself?
On Tue, Feb 5, 2013 at 12:46 PM, seba.wag...@gmail.com < seba.wag...@gmail.com> wrote: > I think we should investigate a bit further before we start to add this > annotation > will ping the openJPA list > > Sebastian > > > 2013/2/5 Maxim Solodovnik <solomax...@gmail.com> > > > So we need to add ForeignKey annotations? > > Or maybe we can write to openjpa mailing list first? > > > > > > On Tue, Feb 5, 2013 at 12:23 PM, seba.wag...@gmail.com < > > seba.wag...@gmail.com> wrote: > > > > > > > > > > > http://openjpa.apache.org/builds/2.2.1/apache-openjpa/docs/ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_fk > > > > > > > > > 2013/2/5 seba.wag...@gmail.com <seba.wag...@gmail.com> > > > > > > > There is an annotation @ForeignKey that you can set at each > attribute. > > > > But I also thought it would happen automatically for those attributes > > > that > > > > are defined as @ManyToOne, @OneToMany or @ManyToMany. Those seem to > > have > > > > also the Indices correctly set. Just FK's missing. > > > > > > > > Sebastian > > > > > > > > > > > > 2013/2/5 Maxim Solodovnik <solomax...@gmail.com> > > > > > > > >> It is weird, I was sure OpenJPA should create all PK, FK and Indices > > :( > > > >> > > > >> > > > >> On Tue, Feb 5, 2013 at 11:55 AM, seba.wag...@gmail.com < > > > >> seba.wag...@gmail.com> wrote: > > > >> > > > >> > Hi, > > > >> > > > > >> > we are using InnoDB, however OpenJPA does not create a single > > Foreign > > > >> key. > > > >> > It does already create indice's (at least for some or even the > > > >> majority). > > > >> > But the FK's are not created when the schema is populated to the > > > >> database. > > > >> > Is there any setting we have overseen or is this a desired > behaviour > > > >> > because of some other requirement? > > > >> > > > > >> > Thanks! > > > >> > Sebastian > > > >> > -- > > > >> > Sebastian Wagner > > > >> > https://twitter.com/#!/dead_lock > > > >> > http://www.webbase-design.de > > > >> > http://www.wagner-sebastian.com > > > >> > seba.wag...@gmail.com > > > >> > > > > >> > > > >> > > > >> > > > >> -- > > > >> WBR > > > >> Maxim aka solomax > > > >> > > > > > > > > > > > > > > > > -- > > > > Sebastian Wagner > > > > https://twitter.com/#!/dead_lock > > > > http://www.webbase-design.de > > > > http://www.wagner-sebastian.com > > > > seba.wag...@gmail.com > > > > > > > > > > > > > > > > -- > > > Sebastian Wagner > > > https://twitter.com/#!/dead_lock > > > http://www.webbase-design.de > > > http://www.wagner-sebastian.com > > > seba.wag...@gmail.com > > > > > > > > > > > -- > > WBR > > Maxim aka solomax > > > > > > -- > Sebastian Wagner > https://twitter.com/#!/dead_lock > http://www.webbase-design.de > http://www.wagner-sebastian.com > seba.wag...@gmail.com > -- WBR Maxim aka solomax