[
https://issues.apache.org/jira/browse/OPENJPA-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116522#comment-18116522
]
ASF subversion and git services commented on OPENJPA-2961:
----------------------------------------------------------
Commit ee6d52aaa899549e9f3927c0385d6204ba207413 in openjpa's branch
refs/heads/OPENJPA-2961 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=ee6d52aaa ]
[OPENJPA-2961] Include subclasses of the treated class in the TREAT
discriminator filter
Build the TREAT condition through the discriminator strategy's class
conditions, so that subclasses of the treated type are matched with an IN
over their discriminator values.
> TREAT discriminator filter excludes subclasses of target
> --------------------------------------------------------
>
> Key: OPENJPA-2961
> URL: https://issues.apache.org/jira/browse/OPENJPA-2961
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3683001854
> **(medium)** `appendTreatDiscriminator` emits `disc = <treated class value>`
> only. Per JPA, `TREAT(x AS Middle)` must also match subtypes of Middle, so
> for a 3-level hierarchy this incorrectly filters out instances of Middle's
> subclasses - it should be an IN over the discriminator values of the treated
> class and all mapped subclasses. It also only handles `cols[0]` of the
> discriminator.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)