I don't see anything wrong. This is from the JPA part of the EJB 3.0 spec:
----------------------------------------------- 4.6.10 Null Comparison Expressions The syntax for the use of the comparison operator IS NULL in a conditional expression is as follows: {single_valued_path_expression | input_parameter } IS [NOT] NULL A null comparison expression tests whether or not the single-valued path expression or input parameter is a NULL value. ----------------------------------------------- single_valued_path_expression includes single_valued_association_path_expression which is designated by the name of an association-field in a one-to-one or many-to-one relationship. The query seems to be fine. May be it's a problem with the JPA implementation that you are using? On Dec 23, 11:11 pm, Mike <gsun...@gmail.com> wrote: > i tried, unfortunately it does not work, but, if i use the following query: > > select o from Person as o where o.address IS not NULL > > it work fine and just get all person that their address is not null. what's > wrong with the original query? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.