Hi there,

I did create a new project with Struts 2 Basic Archetype. I modified the
UserManager(Impl)
and UserDao(Hibernate) and add a new method:

In UserManagerImpl:
    public List findUsers(DetachedCriteria criteria) {
        return dao.findUsers(criteria);  
    }

In UserDaoHibernate:
    public List findUsers(DetachedCriteria criteria) {
        return getHibernateTemplate().findByCriteria(criteria);                
    }


Then I did create a new action: SearchAction with search() method as below:
public String search() {
     users = userManager.findUsers(createCriteria());
     return SUCCESS;
}
...
private DetachedCriteria createCriteria() {
    DetachedCriteria criteria = DetachedCriteria.forClass(User.class);
    // More than 30 criterion come here!
    return criteria;
}

I did search and everything was OK. I created a new User (with sign-up) and
set its attributes
and searched again, No results found! 

Note: This is not related to i18n, I tested the search against this and it
was ok.
In simple words, this search doesn't find any new User even when they are
totally matched 
with criteria.

Any suggestion?

Thanks,
Ali Behzadian.  
-- 
View this message in context: 
http://www.nabble.com/Strange-search-behaviour-tp18168199s2369p18168199.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to