db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker QueryTest.java
Date Fri, 25 Jun 2004 12:20:57 GMT
brj         2004/06/25 05:20:57

  Modified:    .        release-notes.txt
               src/test/org/apache/ojb/broker QueryTest.java
  Log:
  temporary fix for escape handling
  
  Revision  Changes    Path
  1.51      +15 -1     db-ojb/release-notes.txt
  
  Index: release-notes.txt
  ===================================================================
  RCS file: /home/cvs/db-ojb/release-notes.txt,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- release-notes.txt	15 Jun 2004 16:37:03 -0000	1.50
  +++ release-notes.txt	25 Jun 2004 12:20:57 -0000	1.51
  @@ -8,6 +8,20 @@
   relational databases. OJB provides ODMG and JDO interfaces.
   
   ---------------------------------------------------------------------
  +Release 1.0 ??
  +---------------------------------------------------------------------
  +
  +KNOWN ISSUES:
  +- The default escape character '\' does not work on MySql and PostgreSql because it's the
default there as well and
  +should therefore be double-escaped. As a workaround always use a custom escape character:
  +
  +	LikeCriteria.setEscapeCharacter('|');
  +	Criteria crit = new Criteria();
  +	crit.addLike("firstname", "h%|%");
  +
  +
  +
  +---------------------------------------------------------------------
   Release 1.0 rc7
   ---------------------------------------------------------------------
   
  
  
  
  1.60      +4 -3      db-ojb/src/test/org/apache/ojb/broker/QueryTest.java
  
  Index: QueryTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/QueryTest.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- QueryTest.java	3 Jun 2004 18:18:17 -0000	1.59
  +++ QueryTest.java	25 Jun 2004 12:20:57 -0000	1.60
  @@ -278,8 +278,11 @@
        */
       public void testLikeEscapedCriteria1()
       {
  +        // BRJ the default escape char '\' does not work for mysql and postgresql 
  +        LikeCriteria.setEscapeCharacter('!');
  +
           Criteria crit = new Criteria();
  -        crit.addLike("firstname", "h%\\%");
  +        crit.addLike("firstname", "h%!%");
           Query q = QueryFactory.newQuery(Person.class, crit);
   
           Collection results = broker.getCollectionByQuery(q);
  @@ -1079,8 +1082,6 @@
           }
   
           // 7 Articles, 2 Books, 3 Cds
  -        //	assertEquals("check size", list.size(), 12);
  -        //
           //  BRJ: path expression is not yet extent aware
           assertEquals("check size", 12, list.size());
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message