Project

General

Profile

Revision 4513cfd5

ID4513cfd5c9956062355de18f22b1fed204280615
Parent fdf36f4e
Child 8d4275af

Added by Andreas Müller 2 months ago

ref #6581 ,ref #9004 fix orphanRemoval for ISingleSourced

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/SingleSourcedEntityBase.java
11 11

  
12 12

  
13 13
import javax.persistence.FetchType;
14
import javax.persistence.ManyToOne;
15 14
import javax.persistence.MappedSuperclass;
15
import javax.persistence.OneToOne;
16 16
import javax.xml.bind.annotation.XmlAccessType;
17 17
import javax.xml.bind.annotation.XmlAccessorType;
18 18
import javax.xml.bind.annotation.XmlElement;
......
52 52
    @XmlElement(name = "source")
53 53
    @XmlIDREF
54 54
    @XmlSchemaType(name = "IDREF")
55
    @ManyToOne(fetch = FetchType.LAZY)
55
    @OneToOne(fetch = FetchType.LAZY, orphanRemoval=true)
56 56
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE, CascadeType.DELETE})
57 57
    private IdentifiableSource source;
58 58

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TypeDesignationBase.java
18 18
import javax.persistence.InheritanceType;
19 19
import javax.persistence.ManyToMany;
20 20
import javax.persistence.ManyToOne;
21
import javax.persistence.OneToOne;
21 22
import javax.persistence.Transient;
22 23
import javax.validation.constraints.NotNull;
23 24
import javax.xml.bind.annotation.XmlElement;
......
111 112
    @XmlElement(name = "source")
112 113
    @XmlIDREF
113 114
    @XmlSchemaType(name = "IDREF")
114
    @ManyToOne(fetch = FetchType.LAZY)
115
    @OneToOne(fetch = FetchType.LAZY, orphanRemoval=true)
115 116
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE, CascadeType.DELETE})
116 117
    private IdentifiableSource source;
117 118

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Classification.java
134 134
    @XmlElement(name = "source")
135 135
    @XmlIDREF
136 136
    @XmlSchemaType(name = "IDREF")
137
    @ManyToOne(fetch = FetchType.LAZY)
137
    @OneToOne(fetch = FetchType.LAZY, orphanRemoval=true)
138 138
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE, CascadeType.DELETE})
139 139
    private IdentifiableSource source;
140 140

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/TaxonNode.java
22 22
import javax.persistence.JoinTable;
23 23
import javax.persistence.ManyToOne;
24 24
import javax.persistence.OneToMany;
25
import javax.persistence.OneToOne;
25 26
import javax.persistence.OrderBy;
26 27
import javax.persistence.OrderColumn;
27 28
import javax.persistence.Table;
......
160 161
    @XmlElement(name = "source")
161 162
    @XmlIDREF
162 163
    @XmlSchemaType(name = "IDREF")
163
    @ManyToOne(fetch = FetchType.LAZY)
164
    @OneToOne(fetch = FetchType.LAZY, orphanRemoval=true)
164 165
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE, CascadeType.DELETE})
165 166
    private IdentifiableSource source;
166 167

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)