Hi Oliver,

On 11/5/07, Oliver Zeigermann <[EMAIL PROTECTED]> wrote:
>
> Hi Vitor!
>
> See my ideas inline :)
>
> 2007/11/2, Vitor Rodrigues <[EMAIL PROTECTED]>:
> ...
> > How can I get OpenJPA to store only these fields without inserting an
> extra
> > ID column? Note that I cannot use a composite ID with several variables,
> > because it is possible to have repeated entries.
>
> Which is impossible. Every row in a table must be unique and every
> RDBMS enforces this.  So, your primary key seems to be composed of all


Oliver, this is not correct. You CAN have duplicate rows without any
restriction.
(Not recommended for optimum performance, but possible and sometimes
necessary).
RDBMS only enforces uniqueness if you create a primary key (either single or
composite) or unique index.


> the above properties (maybe minus quantity). Looking at it more
> closely, are you sure that poid isn't your primary key?


No, poid is not my primary key. I have several rows with the same poid. I
know this doesn't sound like a good design, but I'm refactoring a sample
application to use OpenJPA and can only change the code, not the data layer.
One of the goals is also to show that OpenJPA can map to an existing data
layer.


Regarding OpenJPA, I suppose it is not possible to avoid the persistence of
these auto generated ID values?

Vitor


HTH
>
> Oliver
>

Reply via email to