EOQualifier, contains, and a pair of relationships

Ondřej Čada <[email protected]> Mon, 15 Aug 2011 20:36:35 +0200
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hello there,

possibly I do something wrong, but can't see what -- any help please?

I need to filter by a presence of another object in a two-level N:1/M:N =
relationship. Means that an enterprise object X should be displayed in =
the DG iff its relToOne leads to any Y whose relToMany contains Z.

Well, what I do is

EOQualifier.qualifierWithQualifierFormat("relToOne.relToMany contains =
%@",new NSArray(Z));

is that conceptually right?

Anyway it does generate _almost_ proper SQL; alas, in one place there's =
a LIKE instead of =3D, namely (cleaned up from the unimportant stuff)

SELECT
  t0.C_CREATION_DATE, ..., t0.C_UID FROM T_AUDIT AS t0,
  T_USER_GROUP_USER AS T2,
  T_USER_GROUP AS T3,
  T_USER AS T1
WHERE (T3.C_UID LIKE 1000004) AND (T1.C_UID=3DT2.C_USER_ID) AND =
(T2.C_GROUP_ID=3DT3.C_UID) AND (t0.C_CREATOR_ID=3DT1.C_UID);

Any idea what do I do wrong and what causes the nonsense LIKE there? Had =
there be a =3D instead, it would work like a charm.

Or -- I admit I am no SQL guru -- should the LIKE work and it is a fault =
of my database (FrontBase 4.4.10) that it chokes over the thing?

And most important, any idea how to fix the problem?

Thanks a lot!
---
Ondra =C4=8Cada
OCSoftware:     [email protected]               http://www.ocs.cz
private         [email protected]             http://www.ocs.cz/oc