-->
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: Mappings files with joins
PostPosted: Fri May 29, 2009 5:26 am 
Newbie

Joined: Thu May 14, 2009 4:19 am
Posts: 12
I was wondering about the following ....

I have the following setup

public class User
{
public virtual string Id { get; set; }
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual IList<Application> Applications { get; set; }

}

public class Application
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual string Owner { get; set; }
public virtual IList<Component> Components { get; set; }

}
public class Component
{
public virtual int ApplicationId { get; set; }
public virtual int Id { get; set; }
public virtual string Type { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }

}

There are 4 tables
User which has columns Id,FirstName,LastName
Application which has columns Id,Name,Description,Owner
Component which has columns Id,ApplicationId, Name, Type,Description (Id, ApplicationId is a compositeKey)

UserApplication which has Columns (UserId, ApplicationId) this Links Users to their Applications.

I was wondering how I would set up the Mapping file.
Could any help or point me in the right direction

thanks
Rak


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.