lundi 15 juin 2015

Hiberanate criteria accepting %% value

I am using the below Hibernate code to filter workFlowName.

crt.add(Restrictions.like("workFlowName", workFlow, MatchMode.ANYWHERE));
crt is the criteria

The problenm is when i pass the value to workFlow from web (TextBox).it fetching the value correctly (I am passing sym in text box if fetch 10 records.if i pass the same value like %sym% again it is fetching same record).

Whether the criteriawill omit when it see %% as argument ?

Thanks.

Aucun commentaire:

Enregistrer un commentaire