X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) X-Junk-Score: 20 [X] X-KAS-Score: 20 [X] From: "Susanne Schneider" Received: from mail3.i-motion.de ([213.95.248.7] verified) by selbstdenker.ag (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 25410846 for webobjects-dev@wocommunity.org; Mon, 15 Feb 2021 14:55:10 +0100 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=213.95.248.7; envelope-from=susanne.schneider@interactive-systems.de Received: from [192.168.2.100] ([79.193.47.8]) by mail3.i-motion.de (13.0.0 build 3 x64) with ASMTP (SSL) id m3202102151454485751 for ; Mon, 15 Feb 2021 14:54:48 +0100 Subject: Re: [WO-DEV] EOQualifier.qualifierWithQualifierFormat ignores proper AND/OR precedence?!? To: WebObjects & WOnder Development References: Message-ID: <77f32afc-7bbc-9217-effa-bafdba87347f@interactive-systems.de> Date: Mon, 15 Feb 2021 14:54:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-CTCH: RefID="str=0001.0A782F25.602A7D28.00B5,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0"; Spam="Unknown"; VOD="Unknown" Hi, imho you should not rely on priority analysis of a method that does text parsing for creating proper SQL (I would assume the brackets are set by order not by operator?). If you need priority brackets either set them yourself in your qualifier string or use the EOAndQualifer and EOOrQualifier classes. Best regards, Susanne Am 15.02.2021 um 14:47 schrieb OCsite: > Hi there, > > is it normal that > > EOQualifier.qualifierWithQualifierFormat("userType = 12 OR userType = 6 > AND subjectType = 3",null) > > creates > > *(((userType = 12) or (userType = 6)) and (subjectType = 3))* > > ? Seems wrong, does it not? /AND/ should always have higher operator > precedence than /OR/, should it not? I was just bit in my tender parts > by this, and I wonder whether this is the standard behaviour or some > weird quirk. > > Thanks, > OC > -- Susanne Schneider Coordinator secuTrial® Development interActive Systems GmbH Glogauer Str. 19, D-10999 Berlin fon +49 30 22 50 50 - 498 fax +49 30 22 50 50 - 451 mail susanne.schneider@interActive-Systems.de web http://www.secuTrial.de ---------------------------------------------------- Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche Sitz der Gesellschaft: Berlin Amtsgericht Berlin Charlottenburg, HRB 106103B ----------------------------------------------------