Pre-requisite: https://hibernate.atlassian.net/browse/HSEARCH-4574
Useful in complicated schemas, to break cycles in particular.
E.g. the following schema wouldn’t work unless we support @ObjectProjection(includeDepth = ...)
@ProjectionConstructor public record WishList( UUID id, String title, Boolean restricted, @ObjectProjection(includeDepth = 1) List<Product> products ) {}
@ProjectionConstructor public record Product( UUID id, String title, String keywords, String description, Integer rating, LocalDate dateAdded, LocalDate dateModified, @ObjectProjection(includeDepth = 1) WishList wishList ) { }