Tôi có HQL nơi tôi đang cố gắng để có được hiện vật mà không có phân loại (khi hoạt động là 0)Không kiểu dữ liệu cho nút: org.hibernate.hql.internal.ast.tree.IdentNode HQL
artifacts = Artifact.findAll("FROM Artifact WHERE id NOT IN (SELECT artifact_id FROM Classification WHERE active = 1) AND document_id = :docid",[docid:document.id], [max:limit, offset:startIndex]);
Bất cứ khi nào tôi chạy tôi nhận được lỗi
java.lang.IllegalStateException: No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode
\-[IDENT] IdentNode: 'artifact_id' {originalText=artifact_id}
Classificaiton định nghĩa:
class Classification {
public static final String USER_DEFAULT = "USER"
public static final String USER_SYSTEM = "SYSTEM"
TaxonomyNode node
String artifactId
Boolean active
String createdBy
String updatedBy
Date dateCreated
Date lastUpdated
static constraints = {
node nullable:false, blank:false
artifactId nullable:false, blank:false, unique: ['node']
active nullable: false, blank: false
createdBy nullable:false, blank:false
updatedBy nullable:false, blank:false
}
static mapping = {
id generator:'sequence', params:[sequence:'classification_seq']
artifactId index: 'classify_by_artifact_node'
node index: 'classify_by_artifact_node'
active defaultValue: "1"
}
}
Bạn có thể tham khảo các vấn đề trước đó tôi phải đối mặt d để hiểu chính xác những gì tôi đang cố gắng làm Quest 1 và Quest 2
Sẽ hữu ích khi xem Định nghĩa phân loại – Krever