openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: Possible to ignore FK constraints?
Date Wed, 06 Apr 2011 16:52:23 GMT
Hi Chris,

It looks like you're using the openjpa.jdbc.SynchronizeMappings property
(with ForeignKeys=true). Could you verify whether that is the case in your
environment?

This setting is useful during application development, but you probably
don't want to use this setting in your production environment. When it's
enabled OpenJPA may attempt to update the table definitions to match your
entities.

HTH

-mike

On Tue, Apr 5, 2011 at 12:49 PM, Rick Curtis <curtisr7@gmail.com> wrote:

> Chris -
>
> Can you paste the exception that you are seeing?
>
> Thanks,
> Rick
>
> On Sun, Apr 3, 2011 at 1:21 PM, Chris Lennert <calennert@gmail.com> wrote:
>
> > Is it possible to instruct OpenJPA to ignore foreign keys to unmapped
> > tables
> > that may exist in the database?
> >
> > My situation:  Large ERP database (thousands of tables) that I'm only
> > reading (never inserting or updating) data from.  My app only is only
> > concerned with reading records from two tables.  One of the tables has
> > numerous foreign key constraints, all of which are outside the scope of
> my
> > app.  Thus, my entity bean class defines only the fields from that table
> > I'm
> > interested in.  Unfortunately, the app blows up when OpenJPA queries the
> > database to determine the constraints that exist on that table and
> promptly
> > complains about unmapped FK constraints.
> >
> > I'm hoping that I can do this without creating entity beans for all these
> > other tables.
> >
> > Thanks for any help you can offer,
> > Chris
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message