Hey all,
I've found several edge cases where the exist qualifier doesn't work because the SQL it generates is invalid - partly because the WebObjects JDBCPlugIn class has a bug that simply sets the table alias to t0 no matter what you do.
But there's good news! I've rewritten the qualifier from the ground up and determined the fix for the PlugIn that needs to be implemented in all the JDBCPlugIn plugins.
I believe it now works across any number relationships, including flattened and compound PK tables - but it no longer has the option to use IN clause instead of an EXISTS clause.
I'll go back to the room and document it a bit better and then release it into the wild.
Dave Sent from my iPhone
On Apr 24, 2015, at 1:46 AM, Paul Hoadley < email@hidden> wrote: I haven't got anything significant to say about Thomas's original post, but just to add a couple of data points:
On 24 Apr 2015, at 5:36 am, Fabian Peters < email@hidden> wrote: AFAIK, it should work for multiple tables, except if any of them use compound primary keys.
This seems to be the received wisdom, but it's just not true in the general case. I have used ERXExistsQualifier on an entity with a compound PK just fine. What you _can't_ do (for obvious reasons) is force it to generate SQL with an IN clause. Whether there are edge cases where you can't combine ERXExistsQualifier, compound PKs, and SQL with an EXISTS clause, I don't know.
You may want to try the ExistsInRelationshipQualifier from the Houdah frameworks, which does handle flattened many-to-many relations.
I certainly can confirm that flattened relationships break ERXExistsQualifier every time.
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|