Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMzEyM2I1...
) / Improvement (
https://hibernate.atlassian.net/browse/HSEARCH-4392?atlOrigin=eyJpIjoiMzE...
) HSEARCH-4392 (
https://hibernate.atlassian.net/browse/HSEARCH-4392?atlOrigin=eyJpIjoiMzE...
) Simpler representation of paths in annotation mapping (
https://hibernate.atlassian.net/browse/HSEARCH-4392?atlOrigin=eyJpIjoiMzE...
)
Change By: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
See [HSEARCH-4386] : the current syntax using {{@ObjectPath}}/{{@PropertyValue}} is far
from clear and can lead to mistakes that yield confusing error messages.
To prevent that kind of mistake in the first place, we could provide (and recommend) a
more straightforward way to provide paths.
h4. Solution 1: simply allow string representations
Minimal changes; just allow passing paths as strings:
{code:java}@IndexingDependency(derivedFrom = {
@ObjectPath( asString fromString = "firstName"),
@ObjectPath( asString fromString = "familyName")
}){code}
Such a syntax would need to handle references to value extractors too, however; maybe
we'll pick the current syntax "foo<collection>.bar", or maybe
we'll switch to something better.
h4. Solution 2: string representations + new annotations with better names/structure
Do the above, but *also* rethink the name and structure of the
{{@IndexingDependency}}/{{@AssociationInverseSide}}/{{@ObjectPath}}/{{@PropertyValue}}
annotations so that it's impossible to think "ah, {{@ObjectPath(value = ...)}}
probably allows me to provide multiple paths".
This is easier said than done, though...
When thinking about this, we should probably take into account the changes suggested in
[HSEARCH-4271]
too.
(
https://hibernate.atlassian.net/browse/HSEARCH-4392#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-4392#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#100207- sha1:ee9e30a )