Hello, I have a problem with an N to M relationship for Entity Analysis [N .. M] AnalysisElements The Query
SELECT count(*)
FROM de.suite4p.hhc.production.pojo.Analysis a,
de.suite4p.hhc.production.pojo.AnalysisElement e
WHERE (a in elements(e.analysis))
AND (a.objid = '1551ce65200f234901204dd85d5565c1')
results to an SQL Query
select count(*) as col_0_0_
from ANALYSIS analysis0_ cross join FRACTION analysisel1_
where analysisel1_.DISCRIMINATOR='ANALYSISELEMENT'
and (analysis0_.OBJID in (analysis2_.OBJID))
and analysis0_.OBJID='1551ce65200f234901204dd85d5565c1'
This results in the error message: ORA-00904: "ANALYSIS2_"."OBJID": invalid Identifier Generating the SQL query with other N-M relationships results in other SQL statements that work. In these cases, the IN Clause is assigned a sub-select. Can anyone tell me why I get this wrong SQL conversion for this N-M relationship? |