openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MiƂosz Tylenda <>
Subject Re: Inheritance.JOINED, PostgreSQL and NATURAL JOIN
Date Mon, 02 Jan 2012 08:20:52 GMT
Hi Rade,

OpenJPA does not use NATURAL JOINs in the generated SQL statements, regardless of the dictionary
you are using. What is used is either INNER/OUTER JOIN or SELECT ... WHERE syntax.


> Hello all.
> I use OpenJPA (currently 2.1.0 version), PostgreSQL (currently 9.0). My model has one
abstract class and many, many extended classes, and inheritance goes four levels deep and
about 20 classes wide (please don't question the model, I am currently proposing the refactoring).
> I have noticed that rather than generating NATURAL JOINS, OpenJPA (versions 1.2.2, 2.0.1
and 2.1.0) tends to generate SELECT ... WHERE statements. Is that so only in my case, or Postgres
Dictionary is just set up that way? Is there a way to force NATURAL JOINs since all my entities
and tables are made such that PKs and FKs bear the same name?
> Thanks for the response!

View raw message