You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Alexey Ousov (JIRA)" <ji...@apache.org> on 2008/01/16 06:45:34 UTC

[jira] Created: (ODE-227) SQL scripts generation for OpenJPA

SQL scripts generation for OpenJPA
----------------------------------

                 Key: ODE-227
                 URL: https://issues.apache.org/jira/browse/ODE-227
             Project: ODE
          Issue Type: Bug
          Components: Build System
    Affects Versions: 1.1, 1.0-incubating, 1.1.1, 1.2
         Environment: Windows XP Pro, JDK 1.5.0.07, Oracle 10g XE, Apache Tomcat 5.5.25
            Reporter: Alexey Ousov


SQL scripts generated by build system for OpenJPA have just indexed fields instead of foreign keys. This issue occurs due to OpenJPA by default thinks that all FK associations are logical. Adding OpenJPA option "openjpa.jdbc.MappingDefaults" = "jpa(ForeignKeyDeleteAction=cascade)" is needed to fix this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (ODE-227) SQL scripts generation for OpenJPA

Posted by "Matthieu Riou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthieu Riou resolved ODE-227.
-------------------------------

    Resolution: Won't Fix
      Assignee: Matthieu Riou

I don't think this is an issue. Having foreign key constraints is a matter of personal preference or policy, not having foreign key constraints as default is a choice we've made. Several databases under heavy load (namely SQL server 2000 and Derby) tend to deadlock much more often with foreign key constraints.

If you want fk constraints then as you mentioned, it's pretty easy to rebuild a schema with them using OpenJPA.

> SQL scripts generation for OpenJPA
> ----------------------------------
>
>                 Key: ODE-227
>                 URL: https://issues.apache.org/jira/browse/ODE-227
>             Project: ODE
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 1.0-incubating, 1.1, 1.1.1, 1.2
>         Environment: Windows XP Pro, JDK 1.5.0.07, Oracle 10g XE, Apache Tomcat 5.5.25
>            Reporter: Alexey Ousov
>            Assignee: Matthieu Riou
>
> SQL scripts generated by build system for OpenJPA have just indexed fields instead of foreign keys. This issue occurs due to OpenJPA by default thinks that all FK associations are logical. Adding OpenJPA option "openjpa.jdbc.MappingDefaults" = "jpa(ForeignKeyDeleteAction=cascade)" is needed to fix this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.