-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Bind 2 tables to one class
PostPosted: Wed Apr 27, 2005 9:57 am 
Newbie

Joined: Wed Apr 27, 2005 9:53 am
Posts: 10
Hi

I'am new to Hibernate

I'am trying something that may be not possible

I want to be able to bind 2 table to a class in the mapping file. In the HQ query I could specify the binding to one of the table. Does its possible or I'm wrong ?


Hibernate version: 3.0

Mapping documents:
<class name="ca.qc.gouv.srcq.db.entity.MenuLocale">
<id name="menuId">
<generator class="assigned"/>
</id>
<property name="nom"/>
<property name="url"/>
</class>

Name and version of the database you are using: MySQL 4.1


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 8:11 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
you can create view, but I don't know is it supported in mysql 4.1

regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 10:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Not sure I completely understand your question. Are you asking if there is a way to bind your MenuLocale class to two seperate distinct tables simultaneously?

If so, this is not possible in Hibernate2. It is possible in Hibernate3 using the "entity-name" stuff.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.