In order to perform pre/post insert/update/delete actions (isRegisterFor(Class<?> clazz)
, postInsert(BeanPersistRequest<?> request)
, ... ) with Ebean in Play, I implemented a class IndexAdapter extends BeanPersistAdapter
.
Works
- app
-- models
--- Car
--- Person
--- House
--- IndexAdapter
-- controllers
--- ...
Everything went well until I decided to transform it (it's more than one class actually) into a Play plugin.
Doesn't work
- app
-- plugin
--- IndexAdapter
-- models
--- Car
--- Person
--- House
-- controllers
--- ...
From a colleague I learned that the class derived from BeanPersistAdapter
will only intervene into the insert/update/delete actions if it's placed inside the models directory. So is there any way of telling the Adapter where the models (on which insert/update/delete actions it should intervene) are located?