Hi
Yeah, unless someone has upgraded it from my original implementation then
AutoMapping wont be able to do that for you automatically and you'll have to
do it manually. For example:

.ForTypesThatDeriveFrom< Person >(
                map =>
                    {
                        map.JoinedSubClass<Employee>("EmployeeId", c => //
Map Derived Class here );
                        map.JoinedSubClass<Guest>("EmployeeId", c
=> map.JoinedSubClass<VipGuest>("EmployeeId", // Map Derived Derived Type
here );
                                });

I think that will do it, I've never done it myself but I believe it will
work.

Andy

On Thu, Feb 26, 2009 at 12:33 AM, BringerOD <bringe...@gmail.com> wrote:

>
> I am having a problem with inheritance.  I cannot get the following
> example to work with the fluent auto mapping.
>
> I took the example from the documentation and added one class.
>
> Everything I did worked until I added the VipGuest class.
>
> How do I get this to work?  Can it work?
>
> Link to the wiki documentation.
> http://wiki.fluentnhibernate.org/show/AutoMappingInheritance
>
>    public class Person
>    {
>        public virtual int Id { get; set; }
>        public virtual string FirstName { get; set; }
>        public virtual string LastName { get; set; }
>    }
>
>    public class Employee : Person
>    {
>        public virtual DateTime StartDate { get; set; }
>    }
>
>    public class Guest : Person
>    {
>        public virtual int GuestPassId { get; set; }
>    }
>
>    public class VipGuest : Guest
>    {
>        public virtual int VIPPin { get; set; }
>    }
>
>
> Thanks Bryan
>
> >
>


-- 
=================
I-nnovate Software - Bespoke Software Development, uk wirral.
http://www.i-nnovate.net

Easy Project Managment Online
http://www.task-mate.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to