You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by br...@apache.org on 2003/04/04 17:50:56 UTC

cvs commit: db-ojb/src/test/org/apache/ojb/broker QueryTest.java

brj         2003/04/04 07:50:56

  Modified:    src/test/org/apache/ojb/broker QueryTest.java
  Log:
  new test case for the 'not unique alias' problem with m:n relationship
  
  Revision  Changes    Path
  1.25      +16 -0     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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- QueryTest.java	26 Mar 2003 21:45:58 -0000	1.24
  +++ QueryTest.java	4 Apr 2003 15:50:56 -0000	1.25
  @@ -263,6 +263,22 @@
   
   	}
   
  +    /**
  +     * Multi Path Expression over nondecomposed m:n
  +     * looking for developers named %b% (the hard way)
  +     */
  +    public void testPathExpressionsMtoN2()
  +    {
  +        Criteria crit = new Criteria();
  +        crit.addEqualTo("projects.roles.roleName", "developer"); 
  +        crit.addLike("projects.persons.lastname", "%b%"); 
  +        Query q = QueryFactory.newQuery(Person.class, crit);
  +
  +        Collection results = broker.getCollectionByQuery(q);
  +        assertNotNull(results);
  +        assertTrue(results.size() > 0);
  +    }
  +
   	/**
   	 * Simple ReportQuery returning rows with 2 columns of Person
   	 */