You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "John Selby (JIRA)" <ji...@apache.org> on 2009/12/23 20:42:29 UTC

[jira] Created: (OPENJPA-1449) TableGenerator pkColumnName / valueColumnName cannot be "

TableGenerator pkColumnName / valueColumnName cannot be "
---------------------------------------------------------

                 Key: OPENJPA-1449
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1449
             Project: OpenJPA
          Issue Type: Bug
            Reporter: John Selby
            Priority: Minor




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


[jira] Commented: (OPENJPA-1449) TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively

Posted by "Xiaoqin Feng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794868#action_12794868 ] 

Xiaoqin Feng commented on OPENJPA-1449:
---------------------------------------

I am on vacation from 12/20/2009  to 12/26/2009.

If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu.

For emergency, contact me at 925-209-5517.


> TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively
> -------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1449
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1449
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: IBM 1.5 JDK
> databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary
>            Reporter: John Selby
>            Priority: Minor
>
> 	@Id
> 	@GeneratedValue(strategy=GenerationType.TABLE,generator="KeyGen")
> 	@TableGenerator(name="KeyGen", table="rtt_sequence_number", pkColumnName="name",
>         valueColumnName="value", pkColumnValue="como")
> Results in a query:
> SELECT VALUE0 FROM rtt_sequence_number WITH (UPDLOCK) WHERE NAME0 = ? [params=(String) como]
> The extra "zero" appended to the end of the string causes the query to fail.
> Using any other values for pkColumnName and valueColumnName results in valid SQL (where the values for pkColumnName and valueColumnName match the annotation)

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


[jira] Updated: (OPENJPA-1449) TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively

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

John Selby updated OPENJPA-1449:
--------------------------------

          Description: 
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator="KeyGen")
	@TableGenerator(name="KeyGen", table="rtt_sequence_number", pkColumnName="name",
        valueColumnName="value", pkColumnValue="como")

Results in a query:
SELECT VALUE0 FROM rtt_sequence_number WITH (UPDLOCK) WHERE NAME0 = ? [params=(String) como]

The extra "zero" appended to the end of the string causes the query to fail.

Using any other values for pkColumnName and valueColumnName results in valid SQL (where the values for pkColumnName and valueColumnName match the annotation)
          Environment: 
IBM 1.5 JDK
databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary
    Affects Version/s: 1.2.1
              Summary: TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively  (was: TableGenerator pkColumnName / valueColumnName cannot be ")

> TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively
> -------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1449
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1449
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: IBM 1.5 JDK
> databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary
>            Reporter: John Selby
>            Priority: Minor
>
> 	@Id
> 	@GeneratedValue(strategy=GenerationType.TABLE,generator="KeyGen")
> 	@TableGenerator(name="KeyGen", table="rtt_sequence_number", pkColumnName="name",
>         valueColumnName="value", pkColumnValue="como")
> Results in a query:
> SELECT VALUE0 FROM rtt_sequence_number WITH (UPDLOCK) WHERE NAME0 = ? [params=(String) como]
> The extra "zero" appended to the end of the string causes the query to fail.
> Using any other values for pkColumnName and valueColumnName results in valid SQL (where the values for pkColumnName and valueColumnName match the annotation)

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


[jira] Updated: (OPENJPA-1449) TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively

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

Milosz Tylenda updated OPENJPA-1449:
------------------------------------

    Comment: was deleted

(was: I am on vacation from 12/20/2009  to 12/26/2009.

If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu.

For emergency, contact me at 925-209-5517.
)

> TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively
> -------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1449
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1449
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: IBM 1.5 JDK
> databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary
>            Reporter: John Selby
>            Priority: Minor
>
> 	@Id
> 	@GeneratedValue(strategy=GenerationType.TABLE,generator="KeyGen")
> 	@TableGenerator(name="KeyGen", table="rtt_sequence_number", pkColumnName="name",
>         valueColumnName="value", pkColumnValue="como")
> Results in a query:
> SELECT VALUE0 FROM rtt_sequence_number WITH (UPDLOCK) WHERE NAME0 = ? [params=(String) como]
> The extra "zero" appended to the end of the string causes the query to fail.
> Using any other values for pkColumnName and valueColumnName results in valid SQL (where the values for pkColumnName and valueColumnName match the annotation)

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


[jira] Commented: (OPENJPA-1449) TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively

Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801367#action_12801367 ] 

Milosz Tylenda commented on OPENJPA-1449:
-----------------------------------------

I guess the behaviour exists because OpenJPA modifies column name if it is an SQL 92 reserved word even if a particular database allows it to be a column name.

I can see these potential workarounds:
1. Extend SQLServerDictionary and override endConfiguration(). Call super and modify reservedWordSet variable as you wish.
2. Modify org/apache/openjpa/jdbc/sql/sql-keywords.rsrc which is included in OpenJPA jar or provide your own and somehow make the classloader load it first.



> TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively
> -------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1449
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1449
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: IBM 1.5 JDK
> databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary
>            Reporter: John Selby
>            Priority: Minor
>
> 	@Id
> 	@GeneratedValue(strategy=GenerationType.TABLE,generator="KeyGen")
> 	@TableGenerator(name="KeyGen", table="rtt_sequence_number", pkColumnName="name",
>         valueColumnName="value", pkColumnValue="como")
> Results in a query:
> SELECT VALUE0 FROM rtt_sequence_number WITH (UPDLOCK) WHERE NAME0 = ? [params=(String) como]
> The extra "zero" appended to the end of the string causes the query to fail.
> Using any other values for pkColumnName and valueColumnName results in valid SQL (where the values for pkColumnName and valueColumnName match the annotation)

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


[jira] Commented: (OPENJPA-1449) TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively

Posted by "Xiaoqin Feng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794883#action_12794883 ] 

Xiaoqin Feng commented on OPENJPA-1449:
---------------------------------------

I am on vacation from 12/20/2009  to 12/26/2009.

If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu.

For emergency, contact me at 925-209-5517.


> TableGenerator pkColumnName / valueColumnName cannot be "name" / "value" respectively
> -------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1449
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1449
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: IBM 1.5 JDK
> databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary
>            Reporter: John Selby
>            Priority: Minor
>
> 	@Id
> 	@GeneratedValue(strategy=GenerationType.TABLE,generator="KeyGen")
> 	@TableGenerator(name="KeyGen", table="rtt_sequence_number", pkColumnName="name",
>         valueColumnName="value", pkColumnValue="como")
> Results in a query:
> SELECT VALUE0 FROM rtt_sequence_number WITH (UPDLOCK) WHERE NAME0 = ? [params=(String) como]
> The extra "zero" appended to the end of the string causes the query to fail.
> Using any other values for pkColumnName and valueColumnName results in valid SQL (where the values for pkColumnName and valueColumnName match the annotation)

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