hi,

I am trying to use hibernate.criterion.Example to find User by Example

this following code will only get all users which username="myuser" & enabled="false"
NOT all user regardless enabled = true or false

bcos when invokes 'new User("myuser")' , user.enabled will be initialized by constructor as false by default.

any solution ? pls advise!

===UserDao.java===
        public List getUsers(User user) {
                return results = getHibernateTemplate().findByExample(
                                        Example.create(new User("myuser")));
        }


===Another Try  but still failed ===
return results = getHibernateTemplate().findByExample(
        Example.create(new User("myuser")).excludeProperty("enabled"));


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

Reply via email to