split expressions

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Tue Jan 12 2010 - 23:13:28 EST

  • Next message: Andrus Adamchik: "Re: split expressions"

    Hi there (particularly Andrus),

    I notice in CAY-514[1] that there's a split syntax using the pipe symbol that works for matchAll expressions. Is this the only possible way of achieving split expressions?

    If we have two expressions (initialised separately - but combined for the select) that happen to be testing the same keyPath across a toMany is it possible to enforce similar behaviour somehow?

    e.g.,
    Expression e1 = ExpressionFactory.like("cousins.firstName", "fred");
    Expression e2 = ExpressionFactory.like("cousins.firstName", "joe");
    Expression e = e1.andExp(e2);

    The resulting sql removes duplicate joins and thus produces no results.

    Trying with pipes fails to resolve the paths:
    Expression e1 = ExpressionFactory.like("cousins.|firstName", "fred");
    Expression e2 = ExpressionFactory.like("cousins.|firstName", "joe");
    // throws exceptions at runtime

    So is it possible to make this work other than using matchAll?

    [1] http://issues.apache.org/jira/browse/CAY-514

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Tue Jan 12 2010 - 23:14:34 EST