Join table in unidirectional one-to-many relationship with Map does not follow 
JPA v2 specification
---------------------------------------------------------------------------------------------------

                 Key: OPENJPA-2127
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2127
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc, jpa
    Affects Versions: 2.1.1
            Reporter: Maria Jurcovicova


According to JPA v2 specification page 50, the joining table name should be 
composed from entity names (e.g. class names) by default. The table should have 
two columns.

Table name:
* owner class name
* underscore "_"
* inverse class name.

Name of the column with inverses ids:
* the name of the relationship property or field of the owner
* underscore "_"
* the name of the primary key column in table inverse.

If the annotated property maps data into the map, OpenJPA assumes different 
database structure.

OpenJPA table name:
* owner class name <- OK
* underscore "_" <- OK
* the name of the relationship property or field of the owner <- WRONG

OpenJPA column with inverses id name:
* "element_id" <- WRONG

Note: this happens only with map. The default table structure with collection 
is different.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to