Hi,
I'm very new to Nhibernate/ActiveRecord. I'm very much impressed by
its features are in the process of implementing it into my new
project. At present I'm stucked with follwoing
1.Role Entity
[ActiveRecord("Roles")]
class Role {
[PrimaryKey(.....)]
property Giud Id {get;set;}
[property]
property string Name {get;set;}
}
2. User Entity
[ActiveRecord("Users")]
class User {
[PrimaryKey(.....)]
property Giud Id {get;set;}
[Property]
property string Name {get;set;}
[BelongsTo("RoleId",Type=typeof(Role),NotNull = true,Lazy =
FetchWhen.Immediate)]
public Role Role {get; set; }
}
/*Note: Every user belongs to one role; */
3. Company Entity
[ActiveRecord("COmpanies")]
class Company {
[PrimaryKey(.....)]
property Giud Id {get;set;}
[Property]
property string Name {get;set;}
}
HERE IS THE ISSUE
I want to define company users (HasAndBelongsToMany), same
time i have to make sure no users having identical role belongs to
same company...
Can anybody help me to solve this?
Regards
Madhu
India
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.