How does Hibernate Restrictions.allEq (Map <String, Object>) function handle null values?
I am wondering how the Hibernate function Restrictions.allEq(Map<String, Object> ...)
handles null values ββinside the input map (if as multiple Restrictions.eq(String, Object)
or Restrictions.eqOrIsNull(String, Object)
) or something).
After a quick search from Google, I couldn't find anything specific from the Hibernate documentation, and only the source says it's Restrictions.allEq(...)
equivalent multiple Restrictions.eq(String, Object)
(see here ).
I'm not sure if this is the correct answer, which is why I am asking here. Thanks everyone in advance
source to share
After downloading the Hibernate sources (4.3.6.Final) and a little checking, I finally found the answer: Restrictions.allEq(Map<String, Object>)
translates as heap Restrictions.eq(String, Object)
and hence the value is null
reassigned as String "null"
(which may or may be incorrect translation based on your specific application).
In my case, I needed to use multiple Restrictions.eqOrIsNull(String, Object)
to properly manage my login Map<String, Object>
.
Hope this question is helpful to someone else.
source to share