Project

General

Profile

bug #8417

LazyInitializationException in TermDTO for media

Added by Patrick Plitzner about 1 year ago. Updated about 2 months ago.

Status:
New
Priority:
New
Category:
cdmlib
Target version:
Start date:
07/30/2019
Due date:
% Done:

0%

Severity:
normal
Found in Version:

Description

Im TaxonRelationshipsDTOTest, der ein einfacher UnitTest ist kommt es zu Problemen wegen der media die neuerdings an Termen hängen können:

http://int.e-taxonomy.eu/jenkins/job/cdmlib-INTEGRATION/10388/eu.etaxonomy$cdmlib-services/testReport/eu.etaxonomy.cdm.api.service.dto/TaxonRelationshipsDTOTest/test/

Die LazyInitializationException

tritt hier in der TermDTO Klasse auf:

Collection<UUID> mediaUuids = new HashSet<>();

Set<Media> media = term.getMedia();

for (Media medium : media) {

   mediaUuids.add(medium.getUuid());

}

dto.setMedia(mediaUuids);

Terme sollten auch ohne Session komplett initialisiert sein ... also eager loading für die media?

History

#1 Updated by Patrick Plitzner about 1 year ago

  • Description updated (diff)

#2 Updated by Patrick Plitzner 12 months ago

  • Target version changed from Release 5.9 to Release 5.10

not important for this release -> move to 5.10

#3 Updated by Patrick Plitzner 11 months ago

  • Target version changed from Release 5.10 to Release 5.11

#4 Updated by Patrick Plitzner 9 months ago

  • Target version changed from Release 5.11 to Release 5.12

#5 Updated by Andreas Müller 8 months ago

  • Assignee changed from Patrick Plitzner to Andreas Müller

#6 Updated by Andreas Müller 7 months ago

  • Target version changed from Release 5.12 to Release 5.13

#7 Updated by Andreas Müller 6 months ago

  • Target version changed from Release 5.13 to Release 5.14

This needs to be discussed. Eager Loading is generally very critical for 1:n relations as objects may be duplicated.

Better try to handle this via a general bean initializer rule like for caches.

#8 Updated by Andreas Müller 4 months ago

  • Target version changed from Release 5.14 to Release 5.15

#9 Updated by Andreas Müller about 2 months ago

  • Target version changed from Release 5.15 to Release 5.17

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)