-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: like Expression not on the value but on the propertyName ??
PostPosted: Wed Aug 16, 2006 6:39 pm 
Newbie

Joined: Fri Jun 02, 2006 7:34 am
Posts: 3
For a registration module not all userNames are allowed. So we filled a database table (BlockedValues) with all kinds of strings that are not allowed as username (assh,dick,motherf etc etc.)

But I don't know how to create such an expression..
The following is just the 'wrong way around':

Criteria criteria = session.createCriteria(BlockedValues.class,"BV");
criteria.add(Expression.like("blockedValue","%"+userName + "%"));

Thanks

Niels


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.