By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,798 Members | 1,342 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,798 IT Pros & Developers. It's quick & easy.

Hibernate help?

P: n/a
We have a mapping file that that has a joined subclass. Here is the dilema.
Inside the subclass, there is a ID field that is the primary key of that
table. Then there is a bag that uses another class. That class has its own
ID field.
Here is a rough idea of the mapping file.
Employee is joined to User by the EmployeeID and User is joined to
DomainUser via the UserID

<class name="Employee" table="Employee">
<id name="EmployeeID" column="EmployeeID">
<generator class="assigned"/>
<joined-subclass name="User" table="Users">
<key column="EmployeeID" />
<bag name="DomainUsers">
<key column="UserID" />
<one-to-many class="DomainUser" />

What we are trying to accomplish is retreving the employee based on the
DomainUserName. I am able to look it up and retreive the correct UserID from
the domain table but it appears to look that value up in the Users table,
however it appears to think that is the EmployeeID instead of the userID. I
need to query the table for the EmployeeID with the UserID that is returned
from the DomainUser table. Any advice. We are a bit stumped. Any help is

Jan 4 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.