[
https://issues.apache.org/jira/browse/OPENJPA-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13999161#comment-13999161
]
brian yoder commented on OPENJPA-1979:
--------------------------------------
I think it may still not be working for constant numeric values. Maybe you
fixed for constant string values, but I am still getting errors in 2.3.0 using
hardcoded numbers:
<openjpa-2.3.0-r422266:1540826 fatal user error>
org.apache.openjpa.persistence.ArgumentException:
"com.sscims.im.entity.IMSObject.refObject" defines a target of ""14"" for
column "entity_type_id", but that target does not exist in table
"dbo.im_ims_obj".
@ManyToOne(fetch=FetchType.LAZY)
@JoinTable(
name="im_ref",
joinColumns={
@JoinColumn(name="entity_type_id", referencedColumnName="14"),
@JoinColumn(name="entity_id", referencedColumnName="obj_type_id")
}
)
> Regression for non-standard joins with constant column values
> --------------------------------------------------------------
>
> Key: OPENJPA-1979
> URL: https://issues.apache.org/jira/browse/OPENJPA-1979
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc, kernel
> Affects Versions: 2.0.0-M1, 2.0.0
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.3.0
>
> Attachments: OPENJPA-1979.patch.1.txt, Test-1979.zip
>
>
> The non-standard join can use constant column values by enclosing them in
> single-quote character. This behavior is regressed. The likely cause of this
> regression is new delimiting support for schema elements introduced in JPA
> 2.0. The constant column value used to be detected during schema definition
> based on the assumption of the name being enclosed in single-quote. Due to
> introduction of delimiting capability, the constant value is now enclosed in
> double-quote followed by a single-quote.
> The visible effect is failure to define schema for non-standard join with
> constant values.
--
This message was sent by Atlassian JIRA
(v6.2#6252)