On Tue, Aug 26, 2008 at 10:54 AM, Alin Dreghiciu <[EMAIL PROTECTED]> wrote:
> I have the following test:
>
>        QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class );
>        Male male = templateFor( Male.class );
>        qb.where(
>            isNull( male.wife() )
>        );
>        Query<Person> query = qb.newQuery( Network.persons() );
>
> where Male is a Person and has a wife association.
>
> The question is: what should happen while executing the query
> regarding the fact that the where clause is expressed against an
> association that does not exist on all Persons, only on Males.
> The RDF indexing behavior is that in the case above all the Persons
> that are not Male are considered to match the where clause and for
> Males only those that do not have a wife association set.

I think the implicit result of the above is;

where( item instanceof Male && isNull( ((Male) item).wife() ) )

and 'item' referring to the entries in the Iterable.


Cheers
Niclas

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to