Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-31-2007, 03:36 AM
Member
 
Join Date: May 2007
Posts: 39
Nick15 is on a distinguished road
Hibernate, help me
I have the classes:
Code:
public class Rol { private int id; private Set projectMember = new HashSet(); private String description; ....getters y setters.... } public class ProjectMember { private int id; private Member member; private Project project; ....getters y setters.... }
the xml
Code:
hibernate-mapping> <class name="Model.Rol" table="item10.role"> <id name="id" type="int" column="OID"> <generator class="native"/> </id> <property name="description" column="DESCRIPTION"/> <set name="projectMember" table="item10.pm_roles"> <key column="ELT"/> <many-to-many class="Model.ProjectMember" column="id_projectmember"/> </set> </class> </hibernate-mapping>
I have the ProjectMember.hbm.xml too
And i try to do a query with HQL:

Query query = session.createQuery("select m FROM Model.Member m, Model.Projec p, Model.Rol r, Model.ProjectMember pMember where r.projectMember.proyecto.id=p.id ");

the red sentence gives me an error. If I use r.projectMember.id works fine but if I use r.projectMember.project.id gives me the error before mentioned.

why?

Last edited by Nick15 : 06-01-2007 at 02:16 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-01-2007, 08:40 AM
Member
 
Join Date: May 2007
Posts: 2
roland is on a distinguished road
would need to see the Project code and mapping to be sure but maybe Project.id does not exist and/or is not mapped

what exactly is the error you get? got a stackdump?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-05-2008, 04:39 PM
Member
 
Join Date: Jun 2008
Posts: 5
JForum4Hari is on a distinguished road
Hi Nick15 ,

If you post the error message, it will be more clear.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


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

vB 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
Hibernate sql query taicode Database 0 03-25-2008 05:17 PM
question about hibernate bbq Database 1 07-09-2007 05:04 AM
org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.2.0.CR1 Heather Database 2 06-30-2007 04:01 PM
Hibernate Alan Database 2 05-11-2007 02:19 AM
Hibernate Shuru Database 2 05-09-2007 06:39 PM


All times are GMT +3. The time now is 10:14 AM.


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