Components might be used in just about every way that simple value types can be used in HQL queries. They can appear in the select
clause:
select p.name from from Person p
select p.name.first from from Person p
where the Person's name property is a component. Components can also be used in the where
clause:
from from Person p where p.name = :name
from from Person p where p.name.first = :firstName
Components can also be used in the order by
clause:
from from Person p order by p.name
from from Person p order by p.name.first