A query selecting a relationship field does not include null in the query result when the value of the relationship field is null. This entry is instead skipped from the query result; for example:
SELECT o.customer FROM Order o WHERE ... |
See https://glassfish.dev.java.net/issues/show_bug.cgi?id=637 for more information.
Select a state field from the related instance.
SELECT o.customer.customerId FROM Order o WHERE ... |