openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi P Palacherla (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1200) Incorrect Entity is returned if ElementClassCriteria is not selected.
Date Tue, 04 May 2010 16:10:55 GMT


Ravi P Palacherla commented on OPENJPA-1200:

Hi Pinaki,

The issue is not about Artist.getItems().
The issue is about when I do Artist.getBOOKS() then movies are also returned, which I guess
is an error.

Book extend Item and Movie extend Item.
Artist has one to many relation with both Book and Movie.

In this scenario, when I do artist.getBooks() then, I think, the expected behavior is to return
only books and not movies.

If you think it is not an error then I can switch the default value of superclassDiscriminatorStrategyByDefault
to be false.
This will return both books and movies when I do artist.getBooks().

If a user do not want to get both books and movies when artist.getBooks() is called, then
they can do one of the below :

1. use openJPA specific annotation ElementClassCriteria  to get only books.
2. use superclassDiscriminatorStrategyByDefault = true to get only books.

Please suggest.


> Incorrect Entity is returned if ElementClassCriteria is not selected.
> ---------------------------------------------------------------------
>                 Key: OPENJPA-1200
>                 URL:
>             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.

View raw message