on 09-14-2016 3:49 PM
Hi,
I have piece of code in my custom Interceptor which extends Prepare Interceptor.
SafetyInfoModel safetyInfoModel = modelService.create(SafetyInfoModel.class);
safetyInfoModel .setCatalogVersion(paramModel.getCatalogVersion());
safetyInfoModel .setCode(paramModel.getCode());
paramModel.setLOrealSafetyInfo(safetyInfoModel );
Here I need to persist the SafetyInfoModel . But I cannot use The modelService.save(SafetyInfoModel) in prepare Interceptor. Is there any good way to do this.
Looking forward to response.
Regards, Yashwanth
The interceptorContext object has a way to ask for items to be saved (after the interceptor returns)
interceptorContext.registerElementFor(safetyInfoModel, PersistenceOperation.SAVE);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.