Does anyone know why the following query, which is good in DB2, is no good
in Oracle:

SELECT c.container_id FROM Simple sim2_, Container c, manyToMany man0_
WHERE (sim2_.count_=2 and man0_.elt=sim2_.id_ and
c.container_id=man0_.container_id2 and man0_.list_index=
(SELECT count(*) FROM manyToMany man1_ WHERE
c.container_id=man1_.container_id2)-1)

Hibernate generates that SQL for this query:

select c from c in class Container where c.manyToMany[ c.manyToMany.size -
1].count = 2



which is kinda useful.





Gavin




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to