How does noMatchExp() work?

From: David Norwood (david..irtuant.com)
Date: Mon Jul 26 2004 - 15:29:34 EDT

  • Next message: Andrus Adamchik: "Re: [ANN] Cayenne Beta 2 Released"

    I've got the following code:

                    ObjectId skipthis = new ObjectId(Packages.class, Packages.ID_PK_COLUMN,
                                    [an integer here]);

                    Expression qualifier = ExpressionFactory.matchExp(
                                    Packages.TO_LOCATION_PROPERTY, aLocation);
                    qualifier = qualifier.andExp(ExpressionFactory.noMatchExp(
                                    Packages.ID_PK_COLUMN, skipthis));
                    qualifier = qualifier.andExp(ExpressionFactory.matchExp(
                                    Packages.ISCOMPLETE_PROPERTY, new Integer(0)));
                    qualifier = qualifier.andExp(ExpressionFactory.matchExp(
                                    Packages.ISDELETED_PROPERTY, new Integer(0)));

                    SelectQuery query = new SelectQuery(Packages.class, qualifier);
                    query.setLoggingLevel(Level.DEBUG);

                    List packages = dctx.performQuery(query);

    This query fails when the 'noMatchExp' is included in the qualifier. What am
    I doing wrong?

    TIA

    -david



    This archive was generated by hypermail 2.0.0 : Mon Jul 26 2004 - 15:29:16 EDT