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