Re: editingContextShouldFetchObjects equivalent for EODataSource/EODataBaseDataSource?
Re: editingContextShouldFetchObjects equivalent for EODataSource/EODataBaseDataSource?
- Subject: Re: editingContextShouldFetchObjects equivalent for EODataSource/EODataBaseDataSource?
- From: Fabian Peters <email@hidden>
- Date: Mon, 05 Dec 2011 21:37:44 +0100
Hi Ramsey,
Am 05.12.2011 um 21:22 schrieb Ramsey Gurley:
> setAuxiliaryQualifier()?
Well, can the auxiliary qualifier be set in a centralized manner? I didn't find any hint how to do that.
Right now I've subclassed EODatabaseDataSource and am adding the qualifier to the fetch spec in the constructor after calling super. When instantiating my subclass directly it works as expected. But I cannot seem to convince my application to use my subclass instead of EODatabaseDataSource:
ERXPatcher.setClassForName(ELEODatabaseDataSource.class, "EODatabaseDataSource");
EODataSource ds = new EODatabaseDataSource(ERXEC.newEditingContext(), "Product");
System.out.println("Application.Application: " + ds.getClass().getCanonicalName());
Gives:
Application.Application: com.webobjects.eoaccess.EODatabaseDataSource
I haven't used ERXPatcher for quite some time - are there any preconditions for it to work?
cheers, Fabian
> Ramsey
>
> On Dec 5, 2011, at 11:27 AM, Fabian Peters wrote:
>
>> Hi all,
>>
>> I'm happily using an EC delegate in a multi-tenant app to add restricting qualifiers in editingContextShouldFetchObjects. Now I'd like to make more use of D2W and am looking for an equivalent when dealing with EODataBaseDataSource. I've looked at EODatabaseContext.Delegate's databaseContextShouldSelectObjects, but the documentation says "The delegate should not modify fetchSpec's qualifier or fetch order".
>>
>> If there's no other way I guess I could subclass EODataBaseDataSource and use ERXPatcher.setClassForName(), but that seems rather drastic?
>>
>> Fabian _______________________________________________
>> 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
>
_______________________________________________
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