Tutorial :MatchMode ANYWHERE and EXACT



Question:

http://www.redhat.com/docs/en-US/JBoss_Hibernate/3.2.4.sp01.cp03/api/hibernate-core/org/hibernate/criterion/MatchMode.html

MatchMode ANYWHERE Match the pattern anywhere in the string

MatchMode EXACT Match the entire string to the pattern

where is the difference. In real examples i can't find difference or my examples are not so good.


Solution:1

ANYWHERE should generate a LIKE pattern of the form '%yoursearchtext%', EXACT should simply generate the pattern 'yoursearchtext'. ANYWHERE will match 'ello' in 'Hello world', EXACT shouldn't.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »