Re: Outer join syntax

From: Mike Kienenberger (mkienen..mail.com)
Date: Thu Aug 17 2006 - 18:18:31 EDT

  • Next message: Mike Kienenberger: "Re: Outer join syntax"

    On 8/17/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > What I was thinking we can do
    > to simplify the semantics specification (and also make expressions
    > parsed from strings work the same way as expressions created via
    > ExpressionFactory) is add join type to the object path string. E.g.
    > use a "+" sign like Oracle did in the past:
    >
    > * Inner join: "toArtist"
    > * Left outer join: "toArtist+"
    > * Longer path with mixed joins: "toGallery+.toAddress"
    >
    > This seems like a reasonable non-verbose solution. What do you think?

    Ugh. This is getting more difficult each step. Apparently
    ExpressionParser doesn't like + as part of an attribute name. I was
    hoping I could simply slice that off the end of an path component
    string when found by PathIterator.next().

    I don't know if I have enough time to learn JJTree & JavaCC,
    particularly since I haven't done anything with compilers in 15 years.
     Any suggestions for me on this one?

    Caused by: org.objectstyle.cayenne.exp.parser.TokenMgrError: Lexical
    error at line 1, column 16. Encountered: "p" (112), after : "."
            at org.objectstyle.cayenne.exp.parser.ExpressionParserTokenManager.getNextToken(ExpressionParserTokenManager.java:1500)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.jj_ntk(ExpressionParser.java:1336)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.numericTerm(ExpressionParser.java:1049)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.multiplySubtractExp(ExpressionParser.java:973)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.scalarNumericExpression(ExpressionParser.java:916)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.scalarExpression(ExpressionParser.java:773)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.simpleCondition(ExpressionParser.java:236)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.notCondition(ExpressionParser.java:226)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.andCondition(ExpressionParser.java:134)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.orCondition(ExpressionParser.java:94)
            at org.objectstyle.cayenne.exp.parser.ExpressionParser.expression(ExpressionParser.java:87)
            at org.objectstyle.cayenne.exp.Expression.fromString(Expression.java:260)
            ... 16 more



    This archive was generated by hypermail 2.0.0 : Thu Aug 17 2006 - 18:18:55 EDT