You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by pankajpriyadarshi <pa...@gmail.com> on 2013/01/07 22:44:04 UTC

Re: Savepoint issue with OpenJPA

Any updates on this issue? Thanks.



--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582461.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Re: Savepoint issue with OpenJPA

Posted by pankajpriyadarshi <pa...@gmail.com>.
Thank You. This works. 

However don't you think that the default behavior for OpenJPA should be to
honour the foreign key constraints even if the openjpa.jdbc.MappingDefaults
is not overriden

I thought OpenJPA did a topological sort to reorder the SQLs so that the
database foreign key constraints are not violated.

Again thank you for the solution. However I think that this should be the
default behavior without the application having to override the
openjpa.jdbc.MappingDefaults



--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582897.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Re: Savepoint issue with OpenJPA

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
  We have looked at the test case you have submitted with this issue. Few
comments
1. The test verifies that SQLs are issued in a particular order. As I had
mentioned before, OpenJPA does not guarantee that. What it ensures that
foreign key constraints are honored when inserting or updating database
records.

2. The test case will function (in terms of intended behavior, not in an
intended SQL execution order) if in persistence.xml, the following mapping
defaults are set   
      <property name="openjpa.jdbc.MappingDefaults"  
                    value="ForeignKeyDeleteAction=restrict,
JoinForeignKeyDeleteAction=none"/>

   This will add foreign key constraints that are commensurate with the
extra DDL script that you have supplied.







-----
Pinaki Poddar
Chair, Apache OpenJPA Project
--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582881.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Re: Savepoint issue with OpenJPA

Posted by pankajpriyadarshi <pa...@gmail.com>.
Is there someone working on this issue? I am not sure what the timeline is
for the JIRA issues to be resolved but an acknowledgement that this is an
issue would be nice. 

I have already attached the test cases to illustrate the issue. In case more
information is required, I would be more than glad to provide that
information.



--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582857.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Re: Savepoint issue with OpenJPA

Posted by pankajpriyadarshi <pa...@gmail.com>.
I tried it but it did not work. These test cases are specific to using the
rollbackToSavepoint feature. Thanks.



--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582656.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Re: Savepoint issue with OpenJPA

Posted by Michael Dick <mi...@gmail.com>.
Have you tried setting openjpa.jdbc.SchemaFactory=native in your
persistence.xml or as a system property? Using the native schema factory
will tell OpenJPA to read the table definitions from the database.

I haven't had a chance to try the testcases, but if it is an SQL ordering
problem, the schema factory will usually help.

-mike


On Tue, Jan 29, 2013 at 2:14 PM, pankajpriyadarshi <pa...@gmail.com>wrote:

> Any updates yet. Do the test cases correctly depict the problem?  Thank
> You.
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582652.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>

Re: Savepoint issue with OpenJPA

Posted by pankajpriyadarshi <pa...@gmail.com>.
Any updates yet. Do the test cases correctly depict the problem?  Thank You.



--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582652.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.