hi!
I have a question regarding a query for the following tables:
Table A:
A.ID
A.COLUMN1
Table B:
B.ID
B.COLUMN1
Table AB (many-to-many table):
AB.ID
AB.ID_A (references A.ID)
AB.ID_B (references B.ID)
AB.COLUMN1
know I need the following query with ejb-ql:
SELECT A
WHERE A.COLUMN1 = ?1
AND B.COLUMN1 = ?2
AND AB.COLUMN1 = ?3
AND AB.ID_A = A.ID
AND AB.ID_B = B.ID
my pojos all have the sets for the related entities (generated with hibernate tools). this means pojo A has A.getABs(), pojo B has B.getABs(), pojo AB has AB.getAs(), AB.getBs().
can anybody help me with the ejb-ql-query?
regards,
chris.
|