Closed GoogleCodeExporter closed 9 years ago
This request can be write in this manner :
select count( w.name) from WELL W
where
W.id in (
select WB.WELL_ID from WELL_BORE WB, WELL_LOG WL, WELL_LOG WL2 where
WL.WELL_BORE_ID = wb.id and
WL.WELL_BORE_ID = WL2.WELL_BORE_ID
AND
WL.kind ='GR'
AND
WL2.kind ='RHOB');
Any way to make it with hibernate-generic-dao ?
Original comment by jmarc.mo...@gmail.com
on 25 Jan 2011 at 10:49
This might work...
new Search(WellBore.class)
.addField("name", OP_COUNT_DISTINCT)
.addFilterSome("wellLog, Filter.equal("kind", "GR"))
.addFilterSome("wellLog, Filter.equal("kind", "RHOB"))
If not, you're going to have to go with raw hibernate query, but there's
nothing wrong with that for these sorts of tricky queries.
Original comment by dwolvert
on 29 Jan 2011 at 8:12
Closing this out. It's more of a question than an issue.
Original comment by dwolvert
on 25 Feb 2011 at 1:44
Original issue reported on code.google.com by
jmarc.mo...@gmail.com
on 24 Jan 2011 at 5:27