Hi,

I am new to hibernate as well as fluent. I am impressed with various 
conveniences offered by nHibernate and Fluent. Thanks a lot.

Coming to an issue that I have run into, and am not able to find solution 
for it. I have create a generics based user repository

public class UserRepository<TUser> :
where TUser : new, IUser
{

}

This is with the view to get reusable user repository class for different 
implementations of IUser.

I have a concretete implementation of IUser called UserImpl, and 
corresponding mapping class UserImplMap : ClassMap<UserImpl> (they all are 
in the same namespace and assembly). I add the mapping using 
AddFromAssemblyOf . I also use this to create / generate the schema.

So far so good and things work as expected.

Now, in a different project, I needed a few additional fields in my IUser 
implementation class, so I implemented a new class UserImplEx : UserImpl. 
Also, I created a new mapping class UserImplExMap : SubclassMap<UserImplEx>

When I create schema using this approach, I get two tables one for UserImpl 
and one for UserImplEx. 

Is is possible to configure / code Fluent mapping in some way so that all 
the properties (self, plus inherited) of UserImplEx get mapped in a single 
table UserImplEx instead of getting split into two tables?

Alternatively, if I provide full mapping in UserImplExMap : 
ClassMap<UserImplEx>, then I do get the schema as desired, but I also get 
an additional table for UserImpl (because corresponding mapping is present 
in the UserRepository assembly). If I follow this approach, is there a way 
to tell AddFromAssemblyOf 





Thanks,
- Vikram

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fluent-nhibernate+unsubscr...@googlegroups.com.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
Visit this group at http://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to