is working and CustomBigDecimalComparator is invoked.
Vehicle v = new Vehicle();
VehicleCharacteristics c = new VehicleCharacteristics();
Vehicle v2 = new Vehicle();
VehicleCharacteristics c2 = new VehicleCharacteristics();
Property p2 = ((Building) new Building().setSelf("B111")).setFloors(
Arrays.asList(new Floor().setArea(BigDecimal.valueOf(3)), new Floor().setArea(BigDecimal.valueOf(7))));
Property p4 = ((Building) new Building().setSelf("B111")).setFloors(Arrays
.asList(new Floor().setArea(new BigDecimal("3.00")), new Floor().setArea(new BigDecimal("7.00"))));
The text was updated successfully, but these errors were encountered:
Your second case is different. Issue happens when you compare List of ValueObjects using AS_SET and one of fields in this ValueObject is a CustomType.
Remember that CustomTypes don't have valid hashCode() so also your ValueObject (Floor) dosn't have a valid hashCode(). Comparing Sets without hashCode() would be very slow for large Sets (n-squared complexity)