Project

General

Profile

bug #7842

TaxonNamePopEditor: adding new name as replaced synonym to name with basionym causes NonUniqueObjectException

Added by Andreas Kohlbecker about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Highest
Category:
cdm-vaadin
Target version:
Start date:
10/23/2018
Due date:
% Done:

100%

Severity:
major
Found in Version:
Tags:

Description

This case is not expected to occur often in real live situations:

A name has a basionym with authorship A. Adding replaced synonym for which a new name is created whereas the replaced synonym shares the same authorteam A with the basionym leads to a NonUniqueObjectException when saving.

Adding an existing name with the the same authorteam A is not causing the exception

Caused by: org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [eu.etaxonomy.cdm.model.agent.Team#277]
    at org.hibernate.engine.internal.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:648)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:284)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:227)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:92)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
    at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:648)
    at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:640)
    at org.hibernate.engine.spi.CascadingActions$5.cascade(CascadingActions.java:218)
    at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:398)
    at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
    at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:162)
    at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:111)
    at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:61)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:358)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:332)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:227)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:92)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
    at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:648)
    at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:640)
    at org.hibernate.engine.spi.CascadingActions$5.cascade(CascadingActions.java:218)
    at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:398)
    at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
    at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:162)

picture729-1.png View (130 KB) Andreas Kohlbecker, 10/23/2018 11:29 AM


Related issues

Related to Edit - bug #7630: blocking registration relations get lost after saving adding a typedesignation to a newly created "typification only" registration Closed 08/06/2018

Associated revisions

Revision c320e0fa (diff)
Added by Andreas Kohlbecker about 2 months ago

fix #7842 reloading registration before adding blocking registrations

History

#1 Updated by Andreas Kohlbecker about 2 months ago

#2 Updated by Andreas Kohlbecker about 2 months ago

  • Description updated (diff)

#3 Updated by Andreas Kohlbecker about 2 months ago

  • Related to bug #7630: blocking registration relations get lost after saving adding a typedesignation to a newly created "typification only" registration added

#4 Updated by Andreas Kohlbecker about 2 months ago

This problem is caused by the code which creates the blocking registrations see #7630

#5 Updated by Andreas Kohlbecker about 2 months ago

  • Target version changed from Release 5.5 to Release 5.4

#6 Updated by Andreas Kohlbecker about 2 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#7 Updated by Andreas Kohlbecker about 2 months ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

#8 Updated by Andreas Kohlbecker about 2 months ago

  • Tags set to phycobank

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)