openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uri Boness" <ubon...@gmail.com>
Subject merge with new instances
Date Sun, 15 Jul 2007 16:54:36 GMT
Hi,

the entityManager.merge() doesn't seem to work properly (at least according
to the spec). Let's say I have a Person record in the database with id = 1.
According to the spec, when merging a new instance of a person with an
existing id (in this case id = 1), the entityManager should figure out that
this id already exists in the database and try to update the existing
record. Currently, merge tries to add a new record to the database, an
operation that obviously fails due to primary key constraint violation. Any
idea why this is happening? do I need to set up certain properties to get it
working correctly (note: I ran the same code under hibernate and
toplink-essentials and in both cases it works fine).

cheers,
Uri

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