Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMzE0ZDZh...
) / Improvement (
https://hibernate.atlassian.net/browse/HSEARCH-4725?atlOrigin=eyJpIjoiMzE...
) HSEARCH-4725 (
https://hibernate.atlassian.net/browse/HSEARCH-4725?atlOrigin=eyJpIjoiMzE...
) @ObjectProjection(includeDepth = ...) or @ObjectProjection(includePaths = ...) to apply
projection constructors up to a certain depth (
https://hibernate.atlassian.net/browse/HSEARCH-4725?atlOrigin=eyJpIjoiMzE...
)
Change By: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Pre-requisite:
[
https://hibernate.atlassian.net/browse/HSEARCH-4574|https://hibernate.atl...]
Useful in complicated schemas, to break cycles in particular.
E.g. the following schema wouldn’t work unless we support {{@ObjectProjection(includeDepth
= ...)}}
{noformat}@ProjectionConstructor
public record WishList(
UUID id,
String title,
Boolean restricted,
@ObjectProjection(includeDepth = 1)
List<Product> products
) {}
{noformat}
{noformat}@ProjectionConstructor
public record Product(
UUID id,
String title,
String keywords,
String description,
Integer rating,
LocalDate dateAdded,
LocalDate dateModified,
@ObjectProjection(includeDepth = 1)
WishList wishList
) {
}
{noformat}
{{includePaths}} would be similarly useful:
{noformat}@ProjectionConstructor
public record Product(
UUID id,
String title,
String keywords,
String description,
Integer rating,
LocalDate dateAdded,
LocalDate dateModified,
@ObjectProjection(includePaths = {" id", title", "products. id",
products. title"})
WishList wishList
) {
}
{noformat}
(
https://hibernate.atlassian.net/browse/HSEARCH-4725#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-4725#add-comment?atlOrigin...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:392b984 )