[ 
https://issues.apache.org/jira/browse/OPENJPA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863829#action_12863829
 ] 

Pinaki Poddar commented on OPENJPA-1200:
----------------------------------------

Not sure of this option or even the original cause as 'error'. The domain model 
presented where Book and Movie both can have many Artists. And hence an Artist 
can be related to both Movies and Books. Thus Artist.getBooks() to return only 
books is the appropriate scenario for ElementClassCriteria (in fact if my 
memory serves me right, that is the exact reason to demonstrate the advanced 
capabilities of OpenJPA that domain model had been originally designed). 

The original use case will behave correctly if @ElementClassCriteria is used -- 
it is that simple. Otherwise Artist.getItems() will return a list of Item 
containing both Book and Movies. 

I


> Incorrect Entity is returned if ElementClassCriteria is not selected.
> ---------------------------------------------------------------------
>
>                 Key: OPENJPA-1200
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1200
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M2
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>             Fix For: 1.1.1, 2.0.0-M3
>
>         Attachments: openJPA-1200_1.1.x.patch, OPENJPA-1200_trunk.patch
>
>


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