RE: Newbie question:

From: Chad Smith (Chad.Smit..c2Solutions.com)
Date: Sun Apr 23 2006 - 11:54:14 EDT

  • Next message: Andrus Adamchik: "Old list address is disabled"

    never mind - it was an assignment problem

    -----Original Message-----
    From: Chad Smith [mailto:Chad.Smit..c2Solutions.com]
    Sent: Sunday, April 23, 2006 8:27 AM
    To: cayenne-use..ncubator.apache.org
    Subject: Newbie question:

    I have this syntax ...

    Expression q1 = ExpressionFactory.matchExp(Company.OWNER_ID_PROPERTY,
    userId);
    Expression q2 = ExpressionFactory.matchExp(Company.SHARED_FLAG_PROPERTY,
    "Y");
    q1.orExp(q2);
    select.andQualifier(q1);

    I want it to produce SQL that looks like this ...

    SELECT *
    FROM company
    WHERE (t0.owner_id = 'jsmith' OR t0.shared_flag = 'Y')

    ... the problem is the OR clause doesn't get appended

    btw: I don't want this syntax ...

    SELECT *
    FROM company
    WHERE (t0.owner_id = 'jsmith') OR (t0.shared_flag = 'Y')

    Can someone tell me what I'm doing wrong?

    Thanks in advance,

         Chad



    This archive was generated by hypermail 2.0.0 : Sun Apr 23 2006 - 11:55:11 EDT