Hi all, I tried to find some entities where a relation (relation) is null or a specific attibute of a related entity is x:
SELECT o FROM MyObject o WHERE (o.relation is empty) OR ((o.relation is not empty) AND (o.relation.attribute LIKE 'x')) But this doesn't work. Debug enabled, I see the SQL-Statement (MySQL) and I guess the paranthesis are wrong: select ... where ... not (exists (select ...)) or (exists (select ...)) and (...attribute like 'x')) I need paranthesis around the last two blocks, but I realy don't know how?! Any help, thank you! Carsten View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960621#3960621 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960621 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
