[JIRA] (HSEARCH-4824) Detect ValueBridge applied to composite objects and warn or fix the dependency model
by Yoann Rodière (JIRA)
Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *created* an issue
Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiY2NiYTlj... ) / Improvement ( https://hibernate.atlassian.net/browse/HSEARCH-4824?atlOrigin=eyJpIjoiY2N... ) HSEARCH-4824 ( https://hibernate.atlassian.net/browse/HSEARCH-4824?atlOrigin=eyJpIjoiY2N... ) Detect ValueBridge applied to composite objects and warn or fix the dependency model ( https://hibernate.atlassian.net/browse/HSEARCH-4824?atlOrigin=eyJpIjoiY2N... )
Issue Type: Improvement Assignee: Unassigned Components: mapper-pojo-base Created: 27/Mar/2023 00:07 AM Fix Versions: 7.x-backlog Priority: Major Reporter: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
See here: https://discourse.hibernate.org/t/tried-to-implement-associationinversesi... ( https://discourse.hibernate.org/t/tried-to-implement-associationinversesi... )
@Embedded
@AttributeOverride( name = "data",
column = @Column(name = "name", columnDefinition = "TEXT")
)
@FullTextField( projectable = Projectable.NO, searchable = Searchable.YES,
analyzer = "customAnalyzer",
valueBridge = @ValueBridgeRef(type = LocalizedFieldBridge.class)
)
private LocalizedField name;
This will lead to problems since, depending on how ORM sends us change events, reindexing may only happen when name changes, not when name.english changes for example.
We should:
* Warn about such misuses on startup.
* Try to fix such misuses by automatically registering dependencies to name.english , etc. if the content of the composite object doesn’t include any entity (i.e. it encompasses a tree, not a graph). Maybe in that casse we shouldn’t produce a warning an just consider it fair use?
( https://hibernate.atlassian.net/browse/HSEARCH-4824#add-comment?atlOrigin... ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-4824#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=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100219- sha1:ac3e918 )
3 years