Bug 802383

Summary: includePaths bombs on inclusion of id members
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Karel Piwko <kpiwko>
Component: HibernateSearchAssignee: Strong Liu <stliu>
Status: CLOSED NEXTRELEASE QA Contact: Karel Piwko <kpiwko>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 2.0.0.ER3CC: ebernard, rnewton, sjacobs
Target Milestone: ---   
Target Release: 2.0.0.ER4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Id properties of embedded objects are not taken into account when checking includePaths properties. As a consequence, listing the ID property of an embedded entity (@IndexedEmbedded) leads to includePaths failing at deployment time. This issue is fixed with JBoss Web Framework Kit 2.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-24 14:51:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Piwko 2012-03-12 12:40:19 UTC
Description of problem:

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.

Additional info:

Clone of https://hibernate.onjira.com/browse/HSEARCH-1049

Comment 1 Emmanuel Bernard 2012-03-12 13:07:30 UTC
Cause
   Id properties of embedded objects are not taken into account when checking includePaths properties.

Consequence
   Listing the id property of an embedded entity (@IndexedEmbedded) leads to includePaths failing
   at deployment time.

Workaround
   Explicitly mark your id properties as @DocumentId (instead of using the implicit mapping)

Result
   @DocumentId is temporarily necessary when includePaths lists an id

Comment 2 Karel Piwko 2012-03-12 13:42:52 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
   Id properties of embedded objects are not taken into account when checking
includePaths properties.

Consequence
   Listing the id property of an embedded entity (@IndexedEmbedded) leads to
includePaths failing
   at deployment time.

Workaround
   Explicitly mark your id properties as @DocumentId (instead of using the
implicit mapping)

Result
   @DocumentId is temporarily necessary when includePaths lists an id

Comment 3 Rebecca Newton 2012-03-13 04:57:42 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,15 +1,2 @@
-Cause
+Id properties of embedded objects are not taken into account when checking
-   Id properties of embedded objects are not taken into account when checking
+includePaths properties. As a consequence, listing the ID property of an embedded entity (@IndexedEmbedded) leads to includePaths failing at deployment time. To workaround this issue, explicity mark the ID properties as @DocumentId instead of using the implicit mapping. This will mean that @DocumentId is temporarily necessary when includePaths lists an ID.-includePaths properties.
-
-Consequence
-   Listing the id property of an embedded entity (@IndexedEmbedded) leads to
-includePaths failing
-   at deployment time.
-
-Workaround
-   Explicitly mark your id properties as @DocumentId (instead of using the
-implicit mapping)
-
-Result
-   @DocumentId is temporarily necessary when includePaths lists an id

Comment 4 Karel Piwko 2012-04-20 12:36:25 UTC
Verified in WFK ER4 + EAP ER5 using junit tests provided by upstream project.

Process of verification:

1/ Get Hibernate Sources
2/ Patch pom.xml to include test dependencies (note, that some of them are from community, because they are not productized)
3/ Activate EAP, WFK Maven Repositories, EAP Plugin repository and JBoss Nexus Repository
4/ Unsign every jar (https://issues.jboss.org/browse/JBPAPP-8694) in the repository, because you're mixing product with project
5/ Tested using on RHEL6 64bit via

mvn -s /path/to/settings.xml clean verify -P h2,default-toolsjar-profile

Comment 5 Emmanuel Bernard 2012-04-23 12:54:24 UTC
Note that this bug has been fixed in https://hibernate.onjira.com/browse/HSEARCH-1049
ie in Hibernate Search 4.1.0.CR3 onwards which is now part of WFK. We need to reevaluate and revert the doc add on if all is fine.

Comment 7 Rebecca Newton 2012-06-19 05:38:21 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,2 +1,2 @@
 Id properties of embedded objects are not taken into account when checking
-includePaths properties. As a consequence, listing the ID property of an embedded entity (@IndexedEmbedded) leads to includePaths failing at deployment time. To workaround this issue, explicity mark the ID properties as @DocumentId instead of using the implicit mapping. This will mean that @DocumentId is temporarily necessary when includePaths lists an ID.+includePaths properties. As a consequence, listing the ID property of an embedded entity (@IndexedEmbedded) leads to includePaths failing at deployment time. This issue is fixed with JBoss Web Framework Kit 2.

Comment 9 Karel Piwko 2012-09-24 14:51:28 UTC
Fixed in WFK 2.0.0.GA.