Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-20-2009, 09:58 PM
Member
 
Join Date: Apr 2009
Posts: 1
Rep Power: 0
eborix13 is on a distinguished road
Default 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 ...
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IntelliJ IDEA or Eclipse Ciwan IntelliJ IDEA 13 04-26-2009 12:59 PM
is IntelliJ is slow in IDE ?? adusumalli IntelliJ IDEA 3 12-16-2008 06:44 PM
Modifying JSP using IntelliJ IDEA 6.0.5 ddeokarb IntelliJ IDEA 0 11-28-2008 02:26 PM
View for warnings and problems JavaForums Java Blogs 0 06-30-2008 06:20 PM
Handling SQL Errors and Warnings Java Tip Java Tips 0 02-12-2008 10:37 AM


All times are GMT +2. The time now is 05:06 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org