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 <[email protected]> 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
