Skip to Content
0
Former Member
Oct 03, 2016 at 04:37 PM

Getting old Value from Prepare interceptor

1776 Views

Hi, I'm using a prpareInterceptor,to save the newatt value and get the oldattr value and save it into another filed.The problem that the interceptor save in the two fields the value of the newattr.

if (ctx.getModelService().isModified(voyageModel)) { if (ctx.isModified(vModel, VModel.NEWATTR)) { final VModel oldVModel = modelService.get(vModel.getPk()); vModel.setOldAttr(oldVModel.getNewAttr()); }

}