Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Re: sql ordering

Georgi Naplatanov

2008-08-25

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello, Reece.

I switched on OpenJPA logging and in some situations OpenJPA try to
insert 2 rows with the same values of constraint's fields which violates
unique constraint.
It occurs only when query's data cache is enabled (it is enabled by
default).

Is your problem stopping raise when you switch off query data cache ?

At this time i can not isolate the problem and i can not prepare a test
case which will reproduce this problem. It is the reason to not open an
issue report.

Reece Garrett wrote:
> Hello,
>
> You may want to look at http://issues.apache.org/jira/browse/OPENJPA-235. I was having problems with OpenJPA violating foreign key constraints because of the order SQL statements ran. Later I found, as have you, that unique constraints are also violated. Foreign keys now seem to be working but unique constraints are still a problem. At one point I was conversing with Markus Fuchs about the problem but we both got busy and nothing got done. My JIRA was closed with instructions that other cases which need addressing should be placed in a separate JIRA. So you should open a new JIRA and link it to OPENJPA-235.
>
> -Reece
>
>>>> Georgi Naplatanov <gosho@(protected) >>>
> Hello, everybody.
>
> Is there a way to be executed generated SQL statements in order in which
> application passes them to OpenJPA ?
>
> I tried "operation-order" implementation, but it reorders statements and
> violates unique constraints in the database despite they are declared in
> persistence classes, even query data cache is switched on.
>
> Best regards
> Georgi
>
>
>
>
>

©2008 gg3721.com - Jax Systems, LLC, U.S.A.