openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Feng Zhang (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1796) JPQL parsing error on subclass if field belongs to MappedSuperclass
Date Wed, 15 Sep 2010 11:48:33 GMT
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


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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message