Select a state field from the related instance.
SELECT c.customerId FROM Order o LEFT OUTER JOIN o.customer c