Re: ExpressionFactory problems

From: Jürgen Saar (jsaa..eb.de)
Date: Wed Apr 13 2005 - 02:42:09 EDT

  • Next message: Mike Kienenberger: "swapping between hsqldb and Oracle: schema"

    Yes ... I know ...
    some little changes should help:

    Expression exp = ExpressionFactory.likeExp("description",desc);
    Expression sLang = ExpressionFactory.likeExp("sourceLang",sl);
    Expression tLang = ExpressionFactory.likeExp("targetLang",tl);
    exp = exp.andExp(sLang);
    exp = exp.andExp(tLang);
    List filtered_entries= exp.filterObjects(budget_entries);

    cayenne-use..bjectstyle.org schrieb am 12.04.05 21:44:06:
    >
    > I'm having some difficulties with the ExpressionFactory doing the
    > in-memory querying.
    >
    > Expression exp = ExpressionFactory.likeExp("description",desc);
    > Expression sLang = ExpressionFactory.likeExp("sourceLang",sl);
    > Expression tLang = ExpressionFactory.likeExp("targetLang",tl);
    > exp.andExp(sLang);
    > exp.andExp(tLang);
    > List filtered_entries= exp.filterObjects(budget_entries);
    >
    > This only seems to filter based on the first expression, exp.
    > Is there anything wrong in this code? I'm perplexed.
    > Also, could anyone tell me what the exp.evaluate() does compared to the
    > filterObjects? Is this only in cases where you know the result is one
    > entry?
    >
    > Thanks,
    >
    > Fredrik

    __________________________________________________________
    Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
    weltweit telefonieren! http://freephone.web.de/?mc=021201



    This archive was generated by hypermail 2.0.0 : Wed Apr 13 2005 - 02:42:15 EDT