Bug 802383 - includePaths bombs on inclusion of id members
includePaths bombs on inclusion of id members
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: HibernateSearch (Show other bugs)
2.0.0.ER3
Unspecified Unspecified
urgent Severity urgent
: ---
: 2.0.0.ER4
Assigned To: Strong Liu
Karel Piwko
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 08:40 EDT by Karel Piwko
Modified: 2013-12-02 18:55 EST (History)
3 users (show)

See Also:
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 10:51:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Piwko 2012-03-12 08:40:19 EDT
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 09:07:30 EDT
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 09:42:52 EDT
    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 00:57:42 EDT
    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 08:36:25 EDT
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 08:54:24 EDT
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 01:38:21 EDT
    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 10:51:28 EDT
Fixed in WFK 2.0.0.GA.

Note You need to log in before you can comment on or make changes to this bug.