[ 
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.

Reply via email to