EJB-QL query never returning unless another query is run

Posted by KevMo on Stack Overflow See other posts from Stack Overflow or by KevMo
Published on 2010-03-30T01:10:09Z Indexed on 2010/03/30 1:13 UTC
Read the original article Hit count: 479

Filed under:
|

I have a strange strange problem.

When executing the following EJB-QL query, my ENTIRE application will stop responding to requests, as the query never finishes executing.

Query q = em.createQuery("SELECT o from RoomReservation as o WHERE o.deleted = FALSE AND o.room.id IN (Select r.id from Room as r where r.deleted = FALSE AND r.type.name = 'CLASSROOM')");

However, if I execute this query before I execute the other query, it runs without issue.

Query dumbQuery = em.createQuery("SELECT o from Room as o WHERE o.deleted = FALSE");

Any idea what in the world is going on?

© Stack Overflow or respective owner

Related posts about toplink

Related posts about ejbql