I have the value object:
@Embeddable
@Value
public class Delivery{
public String courier;
public String trackingNumber;
@JsonFormat(pattern = "yyyy-MM-dd")
public LocalDate deliveryDate;
@JsonFormat(pattern = "yyyy-MM-dd")
public LocalDate expectedDeliveryDate;
}
And I have tried with @Data
and @EqualsAndHAshCode
annotations as well. But even when all the fields have exactly the same value on both objects, .equals
always returns false. Is this expected behavior?