openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi P Palacherla (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1051) Mappingtool doesn't check name conflicts if MappingDefaultsImpl is called with multiple columns.
Date Tue, 28 Apr 2009 16:43:30 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ravi P Palacherla updated OPENJPA-1051:
---------------------------------------

    Attachment: OPENJPA-1051_Trunk.patch

I added temporary name set to detect such name conflicts to Table  and NameSet classes. 
Then, MappingDefaultsImpl uses this mechanism. 
 name collision is detected in NameSet class and resolved truncated name is added on MappingDefaultsImpl.
 After resolving all names, temporary name cache is removed on 
 MappingDefaultsImpl.

 The fix can be verified by new unittest class TestMappingDefaultsImpl.java.

 Testing Done:
 OpenJPA head

> Mappingtool doesn't check name conflicts if MappingDefaultsImpl is called with multiple
columns.
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1051
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1051
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.0.0, 2.0.0
>         Environment: OpenJPA Trunk.
>            Reporter: Ravi P Palacherla
>         Attachments: OPENJPA-1051_Trunk.patch
>
>
>  In  OpenJPA implementation, it looks that MappingDefaultsImpl.populateColumns can accept
multiple columns 
>  because it has Column[] signature.
>  If column name is longer than DBDictionary restriction (it's very short in some databases.

>  For example, oracle max name length is 32), names are truncated. 
>  
>  Because name conflict is detected based on actual Table info,given Column[] data does
not get checked. 
>  So, if given Column[] have very long name and truncated name of these Column[] is conflicted,

>  it could not be detected.

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


Mime
View raw message