Answer the question
In order to leave comments, you need to log in
How to merge two different entities on unrelated fields in Criteria Hibernate?
Hello.
How to merge two different entities on unrelated fields in Criteria Hibernate?
The question is.
You need to make the following request.
SELECT COUNT(P.ID) FROM TBX_P_PRODUCT P
INNER JOIN TBX_CH_CHARACTERISTIC CHS ON CHS.ID_PRODUCT_ROW = P.ID
AND (CHS.VALUE IN ('value'))
@Entity
@Table(name = "tbx_p_product")
class Product {
private id: UUID = null
private var title: String? = null
}
@Entity
@Table(name = "tbx_ch_characteristic")
class Characteristic {
private id: UUID = null
private var title: String? = null
private var idProduct: UUID? = null
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question