Use of Components in HQL by R4R Team

In Hibernate Components can be used similarly to the simple value types that are used in HQL queries. They can appear in the select clause as follows:

1. select p.name from Person p
2. select p.name.first from Person p

where the Person's name property is a component. Components can also be used in the where clause:

from Person p where p.name = :name
from Person p where p.name.first = :firstName

Components can also be used in the order by clause:

from Person p order by p.name
from Person p order by p.name.first
Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!