openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: AW: Diamond model and foreign keys
Date Thu, 22 Sep 2011 16:29:18 GMT
  > a solution similar to b) (with Object as a part of EmbeddedKey) was
implemented in my original project as the error first occured.

  Why made you change that model?

> rather strange that OpenJPA makes everything correct having less
> information
  It is not strange. When it has duplicate info and no knowledge of that
they are duplicate, it gets confused. If there is only one piece of
information and no duplicate -- no confusion.

> the duplicate mapping comes from the OpenJPA reverse mapping tool.
I noticed that. But here is a deeper chasm. In relational database
references are inherently bi-directional i.e. a foreign key represents a
bi-directional relation. In Java world, all references are uni-directional.
The code has to ensure the semantics of referential consistency. That deep
chasm is what ORM "tries" to bridge, and fails at times as you may have
noticed :)

Pinaki Poddar
Chair, Apache OpenJPA Project
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message