There is one detail that I do not like to much: To be able to create a query you have to start from a QueryBuilderFactory and this factory you can only get it from a UnitOfWork. This makes sense for a query on entities but for a query on iterables the unit of work is useless. So, even if you want to do a query on iterable of composites you still have to have a valid assembled unit of work. Maybe it should be possible to get a query builder factory from Module. In this case the newQuery() can either throw an exception and let user know that he has to get the factory from the module if he wants to use this method or use the module to get the unit of work (current or new one?).
On Wed, Aug 27, 2008 at 11:30 AM, Rickard Öberg <[EMAIL PROTECTED]> wrote: > Alin Dreghiciu wrote: >> I implemented the filtering support for iterable queries, so the old >> support we dropped is back. >> I also moved the newQuery(iterable<T>) from QueryBuilderFactory to >> QueryBuilder (same place as the "standard" newQuery). > > Absolutely fantastic! > >> What is still to be done is support for ManyAssociation traversing as >> in the following testcase (that is supported by RDF indexing): >> >> QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class ); >> Person personTmpl = templateFor( Person.class ); >> Domain personInterestsTmpl = oneOf( personTmpl.interests() ); >> qb.where( eq( personInterestsTmpl.name(), "Cars" ) ); >> >> Query<Person> query = qb.newQuery( Network.persons() ); >> >> I will work on this by tomorrow. > > Ok, goodie! This is going to be great when it's done. The funny part is > that you can create a Query and then use that as input for another > Query, since it's an Iterable... > > /Rickard > > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev > -- Alin Dreghiciu http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org - New Energy for Java - Domain Driven Development. http://malaysia.jayway.net - New Energy for Projects - Great People working on Great Projects at Great Places _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

