Project

General

Profile

Revision fa76e2f9

IDfa76e2f9b773da112863f3f6425b35da7d22207d
Parent 843f2ff8
Child 3dde2518

Added by Andreas Kohlbecker over 3 years ago

ref #6612 fixing problem in save operation: evict bean before merge to avoid duplicate beans in same session

View differences:

src/main/java/eu/etaxonomy/vaadin/mvp/AbstractCdmEditorPresenter.java
74 74
        @SuppressWarnings("unchecked")
75 75
        BeanItem<DTO> itemDataSource = ((BeanFieldGroup<DTO>)commitEvent.getFieldBinder()).getItemDataSource();
76 76
        DTO bean = itemDataSource.getBean();
77
        // evict bean before merge to avoid duplicate beans in same session
78
        session.evict(bean);
77 79
        @SuppressWarnings("unchecked")
78 80
        DTO mergedBean = (DTO) session.merge(bean);
79 81
        itemDataSource.setBean(mergedBean);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)