Re: Or qualifiers
Re: Or qualifiers
- Subject: Re: Or qualifiers
- From: Ramsey Gurley <email@hidden>
- Date: Fri, 01 Aug 2014 16:19:43 -0700
Missing a parenthesis after peer not authenticated… d’oh.
On Aug 1, 2014, at 3:52 PM, Ramsey Gurley <email@hidden> wrote:
> Hi all,
>
> I’m wondering if anyone has seen this before. I am using Wonder 6.1 tag and wonder postgresql plugin. I have something like
>
> ERXQ.or(a.and(b), c.and(d), e.and(f));
>
> But when the where clause is generated, I get something like
>
> (a and b) or (c and d and (e and f))
>
> when I would expect
>
> (a and b) or (c and d) or (e and f)
>
> Actual qualifier and sql logged are:
>
> EOQualifier q = ERXQ.or(
> ERCMailMessage.STATE.eq(ERCMailState.SUPPRESSED)
> .and(ERXQ.not(ERCMailMessage.MAIL_RECIPIENTS.dot(ERCMailRecipient.MAIL_ADDRESS).dot(ERCMailAddress.DATE_LAST_SENT.isNull())))
> .and(ERXQ.not(ERCMailMessage.MAIL_RECIPIENTS.dot(ERCMailRecipient.MAIL_ADDRESS).dot(ERCMailAddress.STOP_REASON.isNotNull())))
> ,ERCMailMessage.STATE.eq(ERCMailState.EXCEPTION)
> .and(ERCMailMessage.EXCEPTION_REASON.contains("peer not authenticated")
> ,ERCMailMessage.STATE.eq(ERCMailState.EXCEPTION)
> .and(ERCMailMessage.EXCEPTION_REASON.contains("AWS Error Code: InternalFailure")))
> );
>
> SELECT t0.dateRead, t0.dateSent, t0.exceptionReason, t0.fromAddressID, t0.htmlClobID, t0.id, t0.mailCategoryID, t0.messageID, t0.plainClobID, t0.replyToAddressID, t0.state, t0.subject, t0.uuid, t0.xMailer FROM ERCMailMessage t0 INNER JOIN ERCMailRecipient T1 ON t0.id = T1.mailMessageID INNER JOIN ERCMailAddress T2 ON T1.mailAddressID = T2.id WHERE ((t0.state = ?::varchar(50) AND not (T2.dateLastSent is NULL) AND not (T2.stopReason is not NULL)) OR (t0.state = ?::varchar(50) AND UPPER(t0.exceptionReason) LIKE UPPER(?::varchar(1000)) ESCAPE '|' AND (t0.state = ?::varchar(50) AND UPPER(t0.exceptionReason) LIKE UPPER(?::varchar(1000)) ESCAPE '|'))) withBindings: 1:'SUPPRESSED'[state], 2:'EXCEPTION'[state], 3:%peer not authenticated%[exceptionReason], 4:'EXCEPTION'[state], 5:%AWS Error Code: InternalFailure%[exceptionReason]
>
> Ramsey
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden