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

Reply via email to