Negating an expression

From: Jim Menard (jim..o.com)
Date: Mon Jan 19 2004 - 22:13:17 EST

  • Next message: Mike Kienenberger: "Re: Negating an expression"

    I'd like to be able to build an expression that is a negation of
    another expression, but I can't figure out how to do so using Cayenne
    Expressions. In SQL, I want to do something like

            NOT (person.name LIKE '%Smith%' OR person.name LIKE '%Jones%')

    I know that I can write this as

            person.name NOT LIKE '%Smith%' AND person.name NOT LIKE '%Jones%'

    but can I build an expression the first way, with NOT?

    I can't simply rewrite the expressions using the latter example because
    I'm dynamically building an expression from smaller pieces.

    If this is not possible, I think it's time for a feature request.

    Thanks for your help.

    Jim

    -- 
    Jim Menard, jim..o.com, http://www.io.com/~jimm/
    "$665.95: The Retail Price of the Beast" -- Unknown
    



    This archive was generated by hypermail 2.0.0 : Mon Jan 19 2004 - 22:13:21 EST