Results 1 to 1 of 1
- 04-20-2009, 08:58 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 1
- Rep Power
- 0
Intellij-Hibernate persistance model warnings
Hello,
I have a really annoying issue in some of my entity classes. Perhaps this is old news for some people but I haven't figured out how to solve this. A lot classes have "<many-to-one> attribute target should be entity" and "<one-to-many> attribute target should be entity" errors. Actually they're just warnings because everything goes ok at compile time and runtime. I only get these on getter methods. Could you please tell me what am I missing or what extra configuration should I make in order to resolve these warnings?
Here is an example of two relationships that generate such warnings:
The hibernate configuration file:
<hibernate-mapping>
<class name="com.treert.people.Person" table="Person">
....
<many-to-one name="primaryName" class="com.treert.people.Name" column="Primary_Name_Id" cascade="save-update"/>
<set name="names" cascade="save-update">
<key column="Person_Id"/>
<one-to-many class="com.treert.people.Name"/>
</set>
</class>
</hibernate-mapping>
The getters in the Person class:
-- this is one of the methods that generates a "<many-to-one> attribute target should be entity" warning
public Name getPrimaryName() {
return primaryName;
}
-- this is one of the methods that generates a "<one-to-many> attribute target should be entity" warning
public Set<Name> getNames() {
return names;
}
Thank you ...
Similar Threads
-
IntelliJ IDEA or Eclipse
By Ciwan in forum IntelliJ IDEAReplies: 13Last Post: 04-26-2009, 11:59 AM -
is IntelliJ is slow in IDE ??
By adusumalli in forum IntelliJ IDEAReplies: 3Last Post: 12-16-2008, 05:44 PM -
Modifying JSP using IntelliJ IDEA 6.0.5
By ddeokarb in forum IntelliJ IDEAReplies: 0Last Post: 11-28-2008, 01:26 PM -
Handling SQL Errors and Warnings
By Java Tip in forum Java TipReplies: 0Last Post: 02-12-2008, 09:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks