Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Gregory Shrago
Subsystem
J2EE.Hibernate
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Stephan Anft
    2 years ago (09 Apr 2009 02:08)
  • Updated by   root
    2 years ago (17 Jan 2010 21:14)
  • Jira: IDEADEV-37827
    (history, comments)
 
IDEA-48575 Persistent attribute is not recognized when using XML-based mapping and Hibernate's natural-id element
1
Issue is visible to: All Users
  The issue is visible to the selected user group only
I think that I have found a bug in IntelliJ IDEA. If I use an XML-based Hibernate mapping, a persistent attribute is not recognized if it is defined inside a <natural-id> element.

For example, the following mapping works without problems:

[..]
<property name="roomNumber"/>
<property name="building"/>
<property name="seats"/>
[..]

All three properties are recognizes and marked in the source code view as well as in the Java EE structure.

Anyhow, if a natural-id element is used, the properties inside are not recognized anymore:

[..]
<natural-id mutable="true">
<property name="roomNumber"/>
<property name="building"/>
</natural-id>
<property name="seats"/>
[..]

If the mapping is configured like above, only the "seats" property is marked as a persistent attribute. "RoomNumber" and "building" are not recognized.

I will attach an example project that demonstrates this issue.

Regards,
Stephan Anft


Environment: Windows Vista, JDK 1.6.0

Issue was resolved
Comments (1)
 
History
 
Linked Issues (?)
 
Louis R. Marascio
  Louis R. Marascio
13 Jun 2009 02:41
2 years ago
I'm seeing the same issue using Intellij Diana #9873. This is annoying, but not fatal. Is there a way to disable the inspection?