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.  [ 1 post ] 
Author Message
 Post subject: Multiple join
PostPosted: Tue Jan 30, 2007 9:03 am 
Newbie

Joined: Sat Jan 06, 2007 4:49 pm
Posts: 5
Hi there,

I have an issue when I have an object linked twice to another object, let me explain.

I have tables

Server 1-* ServerGroup_Server *-1 Server Group

Server 1-* Server Group

Mapping File

Code:
<class name="Support.v1.Domain.ServerGroup, Support.v1.Domain" table="ServerGroup">
    <id name="Identity" column="servergroup_id">
      <generator class="guid.comb" />
    </id>
    <property name="Name" column="name"/>

    <many-to-one name="Owner" class="Support.v1.Domain.Employee, Support.v1.Domain" column="owner_id"/>
   
    <many-to-one name="GroupMonitor" class="Support.v1.Domain.Server, Support.v1.Domain" column="group_monitor"/>
   
    <bag name="Servers" table="ServerGroup_Server" lazy="true" cascade="save-update">
      <key column="servergroup_id" />
      <many-to-many class="Support.v1.Domain.Server, Support.v1.Domain" column="server_id"/>
    </bag>
  </class>


The Server Group has a collection of servers, one of which is also the GroupMonitor.

I want it to return the full collection of servers but also a populated server object for the GroupMonitor property

Currently It only returns the collection of servers minus the GroupMonitor server.

Any ideas or help welcome!

Thanks


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

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.