Re: Unable to build the right expression

From: Tore Halset (halse..vv.ntnu.no)
Date: Tue Aug 24 2004 - 14:55:56 EDT

  • Next message: Andrus Adamchik: "Re: WebApplicationContextProvider"

    On Aug 24, 2004, at 15:52, Claudio Rosati wrote:

    > Expression exp = ExpressionFactory.likeIgnoreCaseExp("name", "%" +
    > stext + "%");
    > exp =
    > exp.orExp(ExpressionFactory.likeIgnoreCaseExp("variantForms.name", "%"
    > + stext + "%"));
    > exp = exp.andExp(ExpressionFactory.matchExp("approved", Boolean.TRUE));

    As you have experienced this will exclude the nodes that does not have
    any leaf nodes.

    It is not the most elegant solution, but are you able to split this up
    into two queries? One for nodes containing stext and another query for
    nodes that has a leaf that contains stext.

    Regards,
      - Tore.



    This archive was generated by hypermail 2.0.0 : Tue Aug 24 2004 - 14:55:59 EDT