Mailing List webobjects-dev@wocommunity.org Message #475
From: Markus Ruggiero (rucotec) <markus.ruggiero@rucotec.ch>
Subject: Re: [WO-DEV] [Q] - EOQualifier based on object's class/entity?
Date: Fri, 25 Aug 2023 13:06:06 +0200
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Signed Data (Text SHA256)
Perfect!
Thanks a lot
---markus---

PS There is waaay too much great stuff in WO to be able to know everything😇.

On 25 Aug 2023, at 01:43, Ramsey Gurley <Ramsey.Gurley@practicemojo.com> wrote:

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.


Markus Ruggiero


rucotec GmbH                        web https://rucotec.ch
Leonhardsberg 1                   email markus.ruggiero@rucotec.ch
4051 Basel / Switzerland         mobile +41 79 508 4701








Content Unaltered as verified By:
<markus.ruggiero@rucotec.ch>
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster