Mailing List webobjects-dev@wocommunity.org Message #474
From: Ramsey Gurley <Ramsey.Gurley@practicemojo.com>
Subject: Re: [WO-DEV] [Q] - EOQualifier based on object's class/entity?
Date: Thu, 24 Aug 2023 23:43:07 +0000
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Have you tried setting isDeep to false?




From: WebObjects & WOnder Development on behalf of Markus Ruggiero (rucotec)
Sent: Thursday, August 24, 2023 7:30 PM
To: WebObjects & WOnder Development
Subject: [WO-DEV] [Q] - EOQualifier based on object's class/entity?

I have a hierarchy of entities like so:
A is the super entity, B extends A (A is not abstract)
I have records in the database representing objects of both types.

Creating qualifiers for any value is easy with ERXKey. But what if I want to limit the query to only A objects or only B objects? The problem here is that all Bs are also As. Filtering As might thus also return some B objects.

I would want to create a qualifier based on the objectís absolute class.

Currently I handle this by including the qualifying field for the classes (single table inheritance). This works but seems to be kind of ugly. Is there a better more elegant way?

Probably more of academical interest.....

---markus---


Confidentiality Notice: This email, including all attachments and replies thereto, are covered by the Electronic Communications Privacy Act, 18 U.S.C. Sections 2510-2521 and are legally privileged. This information is confidential, and intended only for the use of the individuals or entities named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this transmitted information is strictly prohibited. Please notify us if you have received this transmission in error. Thank you.
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster