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

Reply via email to