I have the following entity view model which I'm trying to convert from a spring data @Projection to the blaze @EntityView equivalent
@Projection(types = Car.class)
@EntityView(Car.class)
public interface CarEntityView {
String getMake();
String getModel();
Owner getOwner();
@Mapping("owner.id")
@Value("#{target.owner?.id}")
UUID getOwnerId();
@Mapping("owner <> null")
@Value("#{target.owner != null}")
boolean hasOwner();
}
The spring annotation for the boolean expression below works fine
@Value("#{target.owner != null}")
But I can't figure out the syntax for the equivalent blaze entity view mapping which doesn't seem to work:
@Mapping("owner <> null")
What is the correct way to map a boolean expression like this?