Project

General

Profile

Revision 83b68cf9

ID83b68cf96b5607b8b0561a40971f975444c1bf5e
Parent a1127475
Child a1b73fc5

Added by Katja Luther over 5 years ago

fix failing editor test because of updateSortindex in mergeEntityListener

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/hibernate/PostMergeEntityListener.java
86 86
            if (TaxonNode.class.isAssignableFrom(entityClazz)){
87 87
                TaxonNode node = (TaxonNode)entity;
88 88
                node.removeNullValueFromChildren();
89
            }else if(PolytomousKeyNode.class.isAssignableFrom(entityClazz)){
90
                PolytomousKeyNode node = (PolytomousKeyNode)entity;
91
                node.removeNullValueFromChildren();
92
            }else if(FeatureTree.class.isAssignableFrom(entityClazz)){
89
            }/*else if(PolytomousKey.class.isAssignableFrom(entityClazz)){
90
                PolytomousKey key = (PolytomousKey)entity;
91
                PolytomousKeyNode rootNode = key.getRoot();
92
                if (rootNode != null){
93
                    if (rootNode.getChildren() != null && Hibernate.isInitialized(rootNode.getChildren())){
94
                        if (Hibernate.isInitialized(rootNode.getChildren())){
95
                            rootNode.removeNullValueFromChildren();
96
                            for (PolytomousKeyNode node:rootNode.getChildren()){
97
                                node.removeNullValueFromChildren();
98
                                if (node.getChildren() != null){
99
                                    if (Hibernate.isInitialized(node.getChildren())){
100
                                        for (PolytomousKeyNode childNode: node.getChildren()){
101
                                            if (Hibernate.isInitialized(childNode.getChildren())){
102
                                                removeNullFromCollections(childNode);
103
                                            }
104
                                        }
105
                                    }
106
                                }
107

  
108
                            }
109
                        }
110
                    }
111
                }
112

  
113

  
114
            }*/else if (PolytomousKeyNode.class.isAssignableFrom(entityClazz)){
115
                PolytomousKeyNode node = (PolytomousKeyNode) entity;
116
                if (node.getChildren() != null && Hibernate.isInitialized(node.getChildren()) ){
117
                    node.removeNullValueFromChildren();
118

  
119
                }
120

  
121
            }   else if(FeatureTree.class.isAssignableFrom(entityClazz)){
93 122

  
94 123
                FeatureTree tree = (FeatureTree)entity;
95 124
                for (FeatureNode node:tree.getRootChildren()){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)