count( propertyName="" )
get( [properties=""] )
properties
then you will get a struct of those properties.getOrFail( [properties=""] )
list(
max,
offset,
timeout,
sortOrder,
ignoreCase,
asQuery=false
asStream=false
)
*
by default.null
if the query returns no results. It can also throw the following exception: NonUniqueResultException - if there is more than one matching result. It can also take in a property list in the properties
argument so instead of giving you a full ORM entity object, it will give you a struct of those properties.EntityNotFound
) if the query returns no results. It can also throw the following exception: NonUniqueResultException - if there is more than one matching result. It can also take in a property list in the properties
argument so instead of giving you a full ORM entity object, it will give you a struct of those properties.offset, max
) are used for pagination. So you can easily paginate the result set. The timeout
argument can be used if the query is expected to be heavy duty, we want to make sure we timeout the execution (throws exception). The ignorecase
is only used for sorting orders.asQuery, asStream
. By default the list()
method will return an array of objects. However, if you want different results you can use this two modifiers to give you a ColdFusion query or a Java stream.count()
and list()
on the same criteria, but due to the internal workings of Hibernate, you must call count()
first, then list()
.