Re: [fluent-nhib] Re: Map two (or more) tables to one class

2010-01-08 Thread James Gregory
+1 On Fri, Jan 8, 2010 at 2:21 PM, Hudson Akridge wrote: > "I don't recommend getting into subclass > (inherited/derived class) approach because classes represent your > database tables (database don't do polymorphism)." > > Unless you mis-spoke here, I strongly disagree. Nhibernate is built arou

Re: [fluent-nhib] Re: Map two (or more) tables to one class

2010-01-08 Thread Hudson Akridge
"I don't recommend getting into subclass (inherited/derived class) approach because classes represent your database tables (database don't do polymorphism)." Unless you mis-spoke here, I strongly disagree. Nhibernate is built around efficient ways to map polymorphism. How an RDBMS maps it is an

[fluent-nhib] Re: Map two (or more) tables to one class

2010-01-07 Thread William Chang
Following the KISS principle when mapping using Fluent NHibernate, I find doing table per class (1 to 1) for everything works very well, easy to understand, and simple to maintain. For your information, I'm developing a complex ASPNET MVC web application that has 24 tables (24 classes). One more th

[fluent-nhib] Re: Map two (or more) tables to one class

2010-01-06 Thread Olga
Thanks everyone, i'm also thought that mapping in separate classes will be the solution, I just wanted to be sure that ther is no other way. On Jan 6, 4:38 pm, Hudson Akridge wrote: > > How can I define that the related column in the CUSTOMER table will be > > CustomerTypeCode and not CustomerId?