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   Serge Baranov
    4 years ago (16 Oct 2007 20:03)
  • Updated by   root
    2 years ago (17 Jan 2010 20:54)
  • Jira: IDEADEV-22684
    (history, comments)
 
IDEA-41656 Good code is red: Hibernate component mapping
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
Support feedback:

I found that IntelliJ 7.0 highlights a valid hibernate "component" mapping as an error:

<hibernate-mapping>
     <class name="com.some.package.MyClass" schema="schemaname" table="mytable">
         <id name="id" column="`ID`" type="long" unsaved-value="null">
             <generator class="assigned"/>
         </id>

         <discriminator column="`TYPE`" type="string" force="false"/>

         <version name="version" column="`VERSION`" type="long"/>

         <property name="MyNumber" column="`NUM`" type="string" length="50"/>
         <property name="memo" column="`MEMO`" type="text"/>
         <property name="signature" column="`SIGN`" type="string" length="50"/>
         <property name="created" column="`CREATED`" type="timestamp" not-null="true" update="false"/>
         <property name="updated" column="`UPDATED`" type="timestamp" insert="false"/>

         <component name="itinerary">
            <property name="origin" column="`ORIG`" type="text"/>
            <property name="destination" column="`DEST`" type="text"/>
         </component>
....
</class>
</hibernate-mapping>


the following section in a hibernate mapping:

<component name="itinerary">
    <property name="origin" column="`ORIG`" type="text"/>
    <property name="destination" column="`DEST`" type="text"/>
</component>


shows "itinerary" in red as well as "origin" and "destination"

The mapping is valid and works as designed, however IntelliJ reports: "Cannot resolve Attribute itinerary.."

Issue was resolved
Comments (0)
 
History
 
Linked Issues (?)
 
Issue has no comments