Project

General

Profile

Revision 4899d396

ID4899d396bd044128d22af342d373c2b94b7694a0
Parent 390d8116
Child 3527ae92

Added by Andreas Müller about 2 years ago

ref #7508 fix lazy loading exception for inverseRepresentations

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/RelationshipTermBase.java
78 78

  
79 79
	@XmlElementWrapper(name = "InverseRepresentations")
80 80
	@XmlElement(name = "Representation")
81
	@OneToMany(fetch = FetchType.LAZY, orphanRemoval=true)
81
	@OneToMany(fetch = FetchType.EAGER, orphanRemoval=true)  //eager loading same as TermBase.representations
82 82
	@JoinTable(name="TermBase_inverseRepresentation",
83 83
        joinColumns=@JoinColumn(name="term_id")
84 84
    )
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/initializer/TermBaseAutoInitializer.java
13 13
import eu.etaxonomy.cdm.model.common.TermBase;
14 14

  
15 15
/**
16
 * Note: Probably not really needed as we are currently loading representations and inverse representations eager.
17
 *
16 18
 * @author a.kohlbecker
17 19
 * @since 30.07.2010
18
 *
19 20
 */
20 21
public class TermBaseAutoInitializer extends AutoPropertyInitializer<TermBase> {
21 22

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)