Revision 71559ffe
Added by Katja Luther over 2 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/term/TermNode.java | ||
---|---|---|
37 | 37 |
|
38 | 38 |
import org.apache.commons.lang3.StringUtils; |
39 | 39 |
import org.apache.log4j.Logger; |
40 |
import org.hibernate.LazyInitializationException; |
|
40 | 41 |
import org.hibernate.annotations.Cascade; |
41 | 42 |
import org.hibernate.annotations.CascadeType; |
42 | 43 |
import org.hibernate.envers.Audited; |
... | ... | |
708 | 709 |
|
709 | 710 |
void updateSortIndex(){ |
710 | 711 |
// TODO workaround (see sortIndex doc) |
711 |
for (int i = 0; i < children.size(); i++) { |
|
712 |
children.get(i).setSortIndex(i); |
|
712 |
try{ |
|
713 |
for (int i = 0; i < children.size(); i++) { |
|
714 |
children.get(i).setSortIndex(i); |
|
715 |
} |
|
716 |
} catch (LazyInitializationException e) { |
|
717 |
logger.info("Cannot clean up uninitialized children without a session, skipping."); |
|
713 | 718 |
} |
719 |
|
|
714 | 720 |
} |
715 | 721 |
|
716 | 722 |
public void removeNullValueFromChildren(){ |
Also available in: Unified diff
ref #9710: switch to dtos for descriptive data set and descriptions for character matrix