Saif
2015-01-24 20:11:24 UTC
Hi Everyone,
I am trying to use Vertical Inheritance,
Abstract ParentEntity "Applicant"
"Person" and "Company" as two Child entities of Applicant,
Person and Company both can have "Applications", so Applicant has
"toApplications" a toManyRelationship with "Application" table,
Applicant has a boolean field isActive,
Person has a field FirstName,
My goal is to fetch the applications where application.toApplicant isActive
= true and Person.FirstName = 'Saif' sorted by Person.FirstName.
Application does not have any direct relationship with Person.
What should be the Qualifier for such?
So far I could not find any :( What I did as workaround is to first fetch
all persons which are Active and typecast the Persons to NSArray<Applicant>
and us in qualifier with Applications like
Application.TO_APPLICATION.in(person), but I don't think it is a good way to
fetch,
I will really appreciate any kind of suggestions,
Thanks,
Saif.
I am trying to use Vertical Inheritance,
Abstract ParentEntity "Applicant"
"Person" and "Company" as two Child entities of Applicant,
Person and Company both can have "Applications", so Applicant has
"toApplications" a toManyRelationship with "Application" table,
Applicant has a boolean field isActive,
Person has a field FirstName,
My goal is to fetch the applications where application.toApplicant isActive
= true and Person.FirstName = 'Saif' sorted by Person.FirstName.
Application does not have any direct relationship with Person.
What should be the Qualifier for such?
So far I could not find any :( What I did as workaround is to first fetch
all persons which are Active and typecast the Persons to NSArray<Applicant>
and us in qualifier with Applications like
Application.TO_APPLICATION.in(person), but I don't think it is a good way to
fetch,
I will really appreciate any kind of suggestions,
Thanks,
Saif.