Hibernate version: 3.2.5
Name and version of the database you are using:Oracle
I am trying to create a Criteria query using aliases. Currently I have
Code:
Criteria criteria = hibernateSession.createCriteria(Hotel.class);
criteria.createAlias("address", "address");
criteria.add(Restrictions.eq("address.street1", "some street"));
This works as I expected, however I would like to take away case sensitivity. I can do this on a Hotel field by doing:
Code:
criteria.add(Restrictions.sqlRestriction("lower({alias}.hotl_name) = lower(?)", "some name", Hibernate.STRING));
which works.
But how do I do this on a created alias field?