openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Solodovnik <solomax...@gmail.com>
Subject Re: @MappedSuperclass fields not found
Date Tue, 24 Jun 2014 16:50:11 GMT
Thanks, for the quick response
It helps :)


On 24 June 2014 23:22, Rick Curtis <curtisr7@gmail.com> wrote:

> Are you listing the <class> elements in your persistence.xml? If so, try to
> add the MappedSuperclass to that list.
>
>
> On Tue, Jun 24, 2014 at 11:17 AM, Maxim Solodovnik <solomax666@gmail.com>
> wrote:
>
> > Hello All,
> >
> > I'm trying to use @MappedSuperclass as follows:
> >
> > @MappedSuperclass
> > public abstract class FileItem implements Serializable {
> > private static final long serialVersionUID = 1L;
> >
> > @Column(name = "deleted")
> > protected boolean deleted;
> >
> > public boolean isDeleted() {
> > return deleted;
> > }
> >
> > public void setDeleted(boolean deleted) {
> > this.deleted = deleted;
> > }
> > }
> >
> > @Entity
> > @NamedQueries({
> > @NamedQuery(name = "get", query = "SELECT f FROM FlvRecording f WHERE
> > f.deleted = false")
> > })
> > @Table(name = "flvrecording")
> >
> > public class FlvRecording extends FileItem {
> > private static final long serialVersionUID = 1L;
> > }
> >
> >
> > While trying to call named query I got:
> > An error occurred while parsing the query filter "SELECT f FROM
> > FlvRecording f WHERE f.deleted = false". Error message: No field named
> > "deleted" in "FlvRecording".
> >
> > I also tried to make fields of abstract superclass private
> > tried to add
> > @Inheritance(strategy = InheritanceType.JOINED)
> >
> > to FlvRecording class
> > What am I doing wrong?
> >
> > Thanks advance for any help
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
>
> --
> *Rick Curtis*
>



-- 
WBR
Maxim aka solomax

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message