users@glassfish.java.net

Re: Long-value in query

From: Mitesh Meswani <Mitesh.Meswani_at_Sun.COM>
Date: Thu, 24 Jul 2008 16:30:31 -0700

Try following...

select a from ModuleGroup as a left join a.company c where a.company is
NULL or c.id=1201149432740 order by a.id

glassfish_at_javadesktop.org wrote:
> Helllo!
>
> Thank you for your help - this works very well!
>
> But it leads me directly into the next problem. At the moment all datasets in my ModuleGroup.-table have NULL-values as company-id. With my query I want to get all datasets that are not assigned to a company (NULL as company-id) or belong to the specified company. When I execute the query now I get no datasets at all. If I assign one dataset to the company with the id 1201149432740 I get this dataset only. The query worked well in JBoss anf gave me all the datasets I needed. Isn't "IS NULL" supported in Glassfish?
>
> Achim
> [Message sent by forum member 'hilwi' (hilwi)]
>
> http://forums.java.net/jive/thread.jspa?messageID=289197
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>