You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jeremy Bauer (JIRA)" <ji...@apache.org> on 2009/03/05 19:33:56 UTC

[jira] Created: (OPENJPA-962) Support the use of delimited-identifiers

Support the use of delimited-identifiers
----------------------------------------

                 Key: OPENJPA-962
                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
             Project: OpenJPA
          Issue Type: Sub-task
          Components: jpa
    Affects Versions: 2.0.0
            Reporter: Jeremy Bauer


This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Updated: (OPENJPA-962) Support the use of delimited-identifiers

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

Jeremy Bauer updated OPENJPA-962:
---------------------------------

    Parent Issue: OPENJPA-1052  (was: OPENJPA-1007)

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Updated: (OPENJPA-962) Support the use of delimited-identifiers

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

Dianne Richards updated OPENJPA-962:
------------------------------------

    Attachment: manual_patch2.txt

Here's the next round of changes, in manual_patch2. This is still only manual support. The total set of annotations supported are:
@Table
@SecondaryTable
@Column
@DiscriminatorColumn
@UniqueConstraint
@TableGenerator
@CollectionTable
@MapKeyColumn
@SequenceGenerator
@PrimaryKeyJoinColumn
@JoinTable
@joinColumn
@MapKeyJoinColumn

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt, manual_patch2.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Resolved: (OPENJPA-962) Support the use of delimited-identifiers

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

Dianne Richards resolved OPENJPA-962.
-------------------------------------

    Resolution: Fixed

The provided support is for manual delimiting of most of the annotations. The additional manual delimiting and the automatic delimiting will be provided in OPENJPA-1115

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt, manual_patch2.txt, manual_patch3.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Commented: (OPENJPA-962) Support the use of delimited-identifiers

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714032#action_12714032 ] 

Fay Wang commented on OPENJPA-962:
----------------------------------

Dianne, 
  In your refactoring effort in SequenceMapping, it seems that the check for whether a particular name is delimited is missing name.endsWith("\""): 

private String addQuotes(String name) {
        if (name != null && name.startsWith("\"")) {
            return "\"" + name + "\"";
}


> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt, manual_patch2.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Assigned: (OPENJPA-962) Support the use of delimited-identifiers

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

Jeremy Bauer reassigned OPENJPA-962:
------------------------------------

    Assignee: Dianne Richards

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Work started: (OPENJPA-962) Support the use of delimited-identifiers

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

Work on OPENJPA-962 started by Dianne Richards.

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Commented: (OPENJPA-962) Support the use of delimited-identifiers

Posted by "Dianne Richards (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709856#action_12709856 ] 

Dianne Richards commented on OPENJPA-962:
-----------------------------------------

Thanks Jeremy.

>>- SequenceMapping.addStandardProperties() - there is some repetitive code that adds delimiters to properties. I think this logic should be refactored into a method. That can be done in the next round of code... :-) 

Already done for the next round. :-)

>>a common naming interface/method

Still planned. I'm making the changes in DBDictionary with that in mind.

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Updated: (OPENJPA-962) Support the use of delimited-identifiers

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

Dianne Richards updated OPENJPA-962:
------------------------------------

    Attachment: manual_patch3.txt

manual_patch3.txt contains the change suggested by Fay

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt, manual_patch2.txt, manual_patch3.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Commented: (OPENJPA-962) Support the use of delimited-identifiers

Posted by "Dianne Richards (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708101#action_12708101 ] 

Dianne Richards commented on OPENJPA-962:
-----------------------------------------

Thanks Catalina for your review.

>>1. use StringUtils.replace where applicable for more readable code 
This is a good suggestion except for one thing: It's possible to include quotes within a delimited string. I have actually done this successfully on Derby. If I do a generic replace, those quotes would be duplicated too, which is not what we want.

>> 2.in DBDictionary,
>>    delimitedCase seems to be the same as schemaCase, can we use the exsiting schemaCase ? 
Actually, although they use the same constants, they are not the same. schemaCase is used for undelimited strings while delimitedCase is used for delimited strings. For example, on DB2 and Derby, undelimited strings are stored as uppercase while, for delimited strings, the case is preserved.

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Commented: (OPENJPA-962) Support the use of delimited-identifiers

Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709515#action_12709515 ] 

Jeremy Bauer commented on OPENJPA-962:
--------------------------------------

Committed manual_patch1.txt for Dianne under revision 774860.

A couple of comments -

- SequenceMapping.addStandardProperties() - there is some repetitive code that adds delimiters to properties.  I think this logic should be refactored into a method.  That can be done in the next round of code...  :-)

- There were some earlier discussions about producing a common naming interface/method set for these types of delimiting/naming operations.  I see that starting to form in the new dictionary methods, but eventually providing an interface is a good goal to work toward, if possible.

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Updated: (OPENJPA-962) Support the use of delimited-identifiers

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

Donald Woods updated OPENJPA-962:
---------------------------------

         Due Date: 03/Apr/09  (was: 03/Apr/09)
    Fix Version/s: 2.0.0-M2

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0-M2
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>             Fix For: 2.0.0-M2
>
>         Attachments: manual_patch1.txt, manual_patch2.txt, manual_patch3.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Commented: (OPENJPA-962) Support the use of delimited-identifiers

Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714550#action_12714550 ] 

Jeremy Bauer commented on OPENJPA-962:
--------------------------------------

Committed manual_patch3.txt for Dianne under revision 780068.

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt, manual_patch2.txt, manual_patch3.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Updated: (OPENJPA-962) Support the use of delimited-identifiers

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

Jeremy Bauer updated OPENJPA-962:
---------------------------------

    Parent Issue: OPENJPA-1007  (was: OPENJPA-956)

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Commented: (OPENJPA-962) Support the use of delimited-identifiers

Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707501#action_12707501 ] 

Catalina Wei commented on OPENJPA-962:
--------------------------------------

Dianne, 
My comment on your patch: 
1. use StringUtils.replace where applicable for more readable code 
    
    for example in SequenceMapping.addStandardProperties: 
     
               appendProperty(props, PROP_TABLE, StringUtils.replace(_table, "\"", "\"\"")); 

 2.in DBDictionary, 
    delimitedCase seems to be the same as schemaCase, can we use the exsiting schemaCase ? 

Catalina Wei


> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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


[jira] Updated: (OPENJPA-962) Support the use of delimited-identifiers

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

Dianne Richards updated OPENJPA-962:
------------------------------------

    Attachment: manual_patch1.txt

I'm iteratively making changes. The first set of changes is supporting manual delimiting of ids, by specifying /"xxx"/ in the annotation values. For this first patch, the following annotation values are supported:
@Table - name, schema
@SecondaryTable - name, schema
@Column - name, table
@CollectionTable - name, schema
@MapKeyColumn - name

These have been tested on Derby and DB2.

> Support the use of delimited-identifiers
> ----------------------------------------
>
>                 Key: OPENJPA-962
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-962
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Dianne Richards
>         Attachments: manual_patch1.txt
>
>
> This task is to support the use of delimited-identifiers as defined by the 2.0 specification.  The 10/31/2008 draft of the specification has some open issues regarding this item and while the spec indicates delimited identifiers can be enabled per an element in the persistence.xml,  the persistence schema does contain the delimited-identifiers definition.   However, work could begin on this item and the enablement of delimited identifiers could be temporarily triggered via a config property (or some other means) to exercise the capability.

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