[ 
https://issues.apache.org/jira/browse/OPENJPA-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla resolved OPENJPA-1796.
--------------------------------------
    Resolution: Won't Fix

Closing as obsolete during backlog cleanup: A 2.0.1 support report with no 
reproducer (same Shindig user as 1797/1799); querying inherited 
@MappedSuperclass fields is basic, TCK-covered behaviour on master, so the 
likely cause is an unenhanced or unlisted superclass. Please reopen if this 
still happens with OpenJPA 4.x.

> JPQL parsing error on subclass if field belongs to MappedSuperclass
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1796
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1796
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 2.0.1
>            Reporter: Kai Feng Zhang
>            Priority: Major
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The class hierarchy  is:
> @MappedSuperclass
> public class ListFieldDb{
>   @Basic
>   @Column(name="field_value", length=255)
>   protected String value;
> }
> @Entity
> @Table(name = "email")
> @PrimaryKeyJoinColumn(name = "oid")
> @NamedQuery(name = EmailDb.FINDBY_EMAIL, query = "select e from EmailDb e 
> where e.value = :email ")
> public class EmailDb extends ListFieldDb {
>   Person person;
>   ...
> }
> When I execute the query from entitymanager, there is an exception thrown:
> <openjpa-2.0.1-r422266:989424 nonfatal user error> 
> org.apache.openjpa.persistence.ArgumentException: An error occurred while 
> parsing the query filter "select e from EmailDb e where e.value = :email". 
> Error message: No field named "value" in "EmailDb". Did you mean "person"? 
> Expected one of the available field names in 
> "org.apache.shindig.social.opensocial.jpa.EmailDb": "[person]".
> I am not sure if this is a known issue, or I missed something? Thanks.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to