I'm using Hibernate version 4.3.5.Final. The problem here is that Hibernate finds entities of the type Foo
where the case of the property address
has different a case (e.g. "BLAFOO"). However, in my example, ex.ignoreCase()
is not called.
I only want to find entities which match the exact case. What am i doing wrong?
Foo myBean = new Foo();
myBean.setAddress("blaFoo");
Example ex = Example.create(myBean);
ex.excludeZeroes();
//ex.ignoreCase();
DetachedCriteria crit = DetachedCriteria.forClass(Foo.class).add(ex);
List<MonitoredApp> apps = dao.findByDetachedCriteria(crit);
This is probably caused by a case insensitive comparison at the database itself.
Check the character set/collation of your table/database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With