[
https://issues.apache.org/jira/browse/OPENJPA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864046#action_12864046
]
Pinaki Poddar commented on OPENJPA-1200:
----------------------------------------
Book b = new Book("book");
Movie m = new Movie("movie");
Artist a = new Artist("Herman Hess");
b.setArtist(a);
m.setArtist(a);
As the above code form the test shows, an Artist instance a is related to a
Movie m and a Book b.
And both Book and Movie sharing the single table have the same column name
"ARTIST" though the relationship field is named 'artist1' and 'artist'
respectively.
Under such mapping, Artist indeed now related to both Movies and Books via the
same column 'ARTIST'
I see that as an 'quirky' usage which can be sorted out by
@ElementClassCriteria to provide a semantics such that Artist.getBooks() or
Artist.getMovies() still filter out the collection-valued relation by the class
of its elements.
> 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.