Bug 947491 - Document that fields declared on @MappedSuperclass parent are not recognized on child entity by programmatic API mapping
Summary: Document that fields declared on @MappedSuperclass parent are not recognized ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: doc-Hibernate-Search-Guide
Version: 2.3.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: GA
: 2.3.0
Assignee: Sneha
QA Contact: thradec
URL:
Whiteboard:
Depends On: 855948
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-02 14:52 UTC by Petr Penicka
Modified: 2016-08-01 01:05 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 855948
Environment:
Last Closed: 2013-07-16 11:32:46 UTC
Type: Feature Request
Embargoed:


Attachments (Terms of Use)

Comment 1 Petr Penicka 2013-04-02 14:54:58 UTC
Please include the information about unrecognized inherited Hibernate Search fields in the Hibernate Search Guide.

Comment 3 Sneha 2013-06-17 06:52:04 UTC
Marek,

Can you please provide more information about what needs to be added the guide for this bug?

Comment 4 Marek Novotny 2013-06-17 07:48:52 UTC
We had in original issue 855948, which this issue is cloned from the following RN text:

"Programmatic API mapping does not recognize Hibernate Search fields inherited from parent entities annotated with @MappedSuperclass. As a consequence, Hibernate Search views the fields as unmapped, resulting in a SearchException. This is not considered a bug, but a by-design behaviour that can only be addressed by a functionality enhancement. Until the functionality is enhanced, the issue can be worked around by overriding the getter methods of the inherited fields in the child entities."

That should be added somewhere in HSearch Guide, but you probably need some guidance from HSearch team to confirm the chapter/section placement.

Comment 5 Sneha 2013-06-17 11:28:18 UTC
I am planning to add the following warning message above 'Example 4.17' in the HSerach guide:

Warning:
Programmatic API mapping does not recognize Hibernate Search fields inherited from parent entities annotated with @MappedSuperclass. As a consequence, Hibernate Search views the fields as unmapped, resulting in a SearchException. This behaviour is due to the design of the application. To work around the exception, override the getter methods of the inherited fields in the child entities. 

Sanne, please confirm.

Comment 6 Sanne Grinovero 2013-06-17 11:44:21 UTC
I've created a JIRA to clarify the documentation:
  https://hibernate.atlassian.net/browse/HSEARCH-1352

Proposed fix is sent as pull request.

Comment 7 Sanne Grinovero 2013-06-17 11:47:59 UTC
Sneha: sorry was working on the same in parallel, and provided a simplified wording version.

I'm not sure what 'Example 4.17' means: in the community documentation that one is very unrelated so I assume the numbering is different.

Comment 8 Sanne Grinovero 2013-06-17 14:38:40 UTC
We merged a documentation improvement upstream:
https://github.com/hibernate/hibernate-search/commit/3e8f095aa8a644dd4a4ed0d07564c07514279ad3


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