我有以下错误:
The state field path 'rel.type' cannot be resolved to a valid type
在以下实体中编译命名查询时:
@NamedQueries({
@NamedQuery(name="findAll" ,
query="SELECT rel " +
"FROM R01EDBEntityForStructureLabelsRelation rel " +
"WHERE rel.type = :type")
})
@Entity
@Table(name = "R01ELABELRELATIONST00") @Cacheable(false)
@Accessors(prefix="_")
@NoArgsConstructor
public class R01EDBEntityForStructureLabelsRelation {
@Id @Column(name="SRC_LABEL_OID",length=50) @Basic
@Getter @Setter private String _sourceLabelOid;
@Column(name="TYPE",length=10) @Enumerated(EnumType.STRING)
@Getter @Setter private R01MStructureLabelRelationType _type;
}
R01MStructureLabelRelationType类型是一个简单的枚举,例如:
public enum R01MStructureLabelRelationType {
SIMILAR
ALIAS
}
有任何想法吗?