Package nl.tailormap.viewer.config
Class RemoveEmptyMapValuesUtil
- java.lang.Object
-
- nl.tailormap.viewer.config.RemoveEmptyMapValuesUtil
-
public class RemoveEmptyMapValuesUtil extends Object
- Author:
- Matthijs Laan
-
-
Constructor Summary
Constructors Constructor Description RemoveEmptyMapValuesUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidremoveEmptyMapValues(Map map)IMPORTANT TO CALL THIS BEFORE SAVING / UPDATING AN ENTITY WITH A DETAILS MAP.
-
-
-
Method Detail
-
removeEmptyMapValues
public static void removeEmptyMapValues(Map map)
IMPORTANT TO CALL THIS BEFORE SAVING / UPDATING AN ENTITY WITH A DETAILS MAP. Hibernate fails to remove map entries with a null value when calling clear() on a map on Oracle. This leads to duplicate key violations when updating layer details.@PreUpdate/@PrePersistnor@EntityListenersdo not work consistenly with cascaded objects in Hibernate, so call this manually!- Parameters:
map- the map to clean up
-
-