cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: AuditableFilter constructor
Date Sun, 09 Mar 2014 18:14:03 GMT
Done.

On Mar 9, 2014, at 8:59 PM, Andrus Adamchik <andrus@objectstyle.org> wrote:

> Hi Mark,
> 
> You are absolutely right. EntityResolver should be initialized inside ‘init’. IIRC
the constructor preceded the full definition of the DataChannelFilter API, so this was overlooked.
And in my own code I add filters when I already have a hold of CayenneRuntime (e.g. [1]),
so this didn’t come up. 
> 
> Let me actually make this change on trunk for 3.2.
> 
> Andrus
> 
> 
> [1] https://github.com/andrus/wowodc13/blob/master/editor/src/main/java/demo/editor/services/cayenne/EditorCayenneService.java
> 
> 
> On Mar 7, 2014, at 12:52 PM, Mark Stobbe <markstobbe85@gmail.com> wrote:
> 
>> Hi all,
>> 
>> The AuditableFilter constructor required an entityResolver to be passed.
>> However, when I am initializing the module there is no way to grab this
>> entityResolver just yet.
>> 
>> After careful inspection I noticed that it is not needed during
>> construction, but only later. Could anyone tell me why the entityResolver
>> is not set in the init(DataChannel) method of the AuditableFilter, such
>> that you can actually use:
>> 
>> binder.bindList(Constants.SERVER_DOMAIN_FILTERS_LIST) //
>>       .add(new ChangeSetFilter()) //
>>       .add(new AuditableFilter(new MyAuditableProcessor()));
>> 
>> in the module.configure(Binder) method.
>> 
>> Mark
> 
> 


Mime
View raw message