[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-1049) includePaths bombs on inclusion of id members
Davide D'Alto (JIRA)
noreply at atlassian.com
Thu Mar 1 14:33:50 EST 2012
[ https://hibernate.onjira.com/browse/HSEARCH-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45778#comment-45778 ]
Davide D'Alto commented on HSEARCH-1049:
----------------------------------------
Mmmmh...I'm expecting all the other tests to fail if you do this...have you already tried to build the project after this change?
The idea is to reuse the same PathsContext across all the Embedded objects. If you create a new one every time you loose the previous informations.
What I think it needs to be changed is the method checkDocumentId(...) in DocumentBuilderIndexedEntity.java
That's the place where the id attribute is identify.
In particular this is my initial fix:
{code}
if ( pathsContext != null )
pathsContext.markEncounteredPath( prefix + attributeName );
{code}
Right now It marks as encountered every id (+ or -), maybe it needs some other checks before the inclusion of a path.
> includePaths bombs on inclusion of id members
> ---------------------------------------------
>
> Key: HSEARCH-1049
> URL: https://hibernate.onjira.com/browse/HSEARCH-1049
> Project: Hibernate Search
> Issue Type: Bug
> Components: engine
> Affects Versions: 4.1.0.Beta2
> Reporter: Marc Schipperheyn
> Priority: Blocker
> Fix For: 4.1.0.Final
>
>
> When I include id members on includePaths, I get
> Found invalid @IndexedEmbedded->paths configured on class nl.project.model.Item, member subitem: item.id
> I use ids a lot and in many cases they are all I'm interested in.
> E.g.
> @IndexedEmbedded(prefix="location.",includePaths={"city.id","city.city","country.id","city.region.id"})
> public Address getAddress() {
> return address;
> }
> will indicate all id fields as erronous.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list