Criteria Query, Hibernate Criteria Query Introduction
Unlike HQL, Criteria is only for selecting the data from the database, that to we can select complete objects only not partial objects, in fact by combining criteria and projections concept we can select partial objects too we will see this angle later, ? but for now see how we are using criteria for selecting complete objects form the database. We cant perform non-select operations using this criteria. Criteria is suitable for executing dynamic queries too, let us see how to use this criteria queries in the hibernate..
syntax:
Criteria crit = session.createCriteria(–Our class object–);
syntax:
Criteria crit = session.createCriteria(–Our class object–);
post a comment