roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r464946 - /incubator/roller/branches/roller_3.0/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
Date Tue, 17 Oct 2006 15:48:25 GMT
Author: snoopdave
Date: Tue Oct 17 08:48:24 2006
New Revision: 464946

URL: http://svn.apache.org/viewvc?view=rev&rev=464946
Log:
the by-letter queries should be case insensitive

Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java?view=diff&rev=464946&r1=464945&r2=464946
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
Tue Oct 17 08:48:24 2006
@@ -829,7 +829,7 @@
         try {
             Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
             Criteria criteria = session.createCriteria(UserData.class);
-            criteria.add(Expression.like("userName", new String(new char[]{letter}) + "%",
MatchMode.START));
+            criteria.add(Expression.ilike("userName", new String(new char[]{letter}) + "%",
MatchMode.START));
             criteria.addOrder(Order.asc("userName"));
             if (offset != 0) {
                 criteria.setFirstResult(offset);
@@ -871,7 +871,7 @@
         try {
             Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
             Criteria criteria = session.createCriteria(WebsiteData.class);
-            criteria.add(Expression.like("handle", new String(new char[]{letter}) + "%",
MatchMode.START));
+            criteria.add(Expression.ilike("handle", new String(new char[]{letter}) + "%",
MatchMode.START)); 
             criteria.addOrder(Order.asc("handle"));
             if (offset != 0) {
                 criteria.setFirstResult(offset);



Mime
View raw message