Maybe it was the way I tried to do it then :) I have to take a closer look at xml mappings just because of that!
On Sat, Oct 31, 2009 at 12:11 AM, Hudson Akridge <[email protected]>wrote: > Wait, what? :) Subclassing a subclass was supported at one point in time, > it might be broken right now, but I'm positive it worked. Also, NH supports > *n *level of subclassing, there's no limit as far as I know, so if there's > a limitation, it would be in FNH, not NH. > > > On Fri, Oct 30, 2009 at 6:09 PM, Mikael Henriksson > <[email protected]>wrote: > >> As far as I know (James told me so a long time ago) subclassing a subclass >> is yet to be supported. He even doubted that it was possible in NHibernate. >> Tell me if you find a way because I have a need for this as well :) >> >> 2009/10/27 [email protected] <[email protected]> >> >> >>> Just wanted to add that I am not using the latest version of Fluent >>> Nhibernate. I downloaded the source code from teh repository on Aug >>> 28th. >>> >>> >>> >>> On Oct 27, 12:06 am, "[email protected]" <[email protected]> >>> wrote: >>> > Hi, >>> > >>> > I have the following class structure. >>> > public class Request >>> > { >>> > public int Id {get;set;} >>> > public string prop1 {get;set;} >>> > >>> > } >>> > >>> > public class RequestA:Request >>> > { >>> > public string propA1 {get;set;} >>> > public string propA2{get;set;} >>> > >>> > } >>> > >>> > public class RequestB: Request >>> > { >>> > public string propB1 {get;set;} >>> > public string propB2{get;set;}} >>> > >>> > public class RequestBB: RequestB >>> > { >>> > public string propBB1 {get;set;} >>> > >>> > } >>> > >>> > and the following Mapping . >>> > public class RequestMap:ClassMap<Request> >>> > { >>> > public RequestMap() >>> > { >>> > Table("Requests"); >>> > Id(....); >>> > Map(...); >>> > >>> > JoinedSubClass<RequestA>("RequestID", MapRequestA); >>> > JoinedSubClass<RequestB>("RequestID", MapRequestB); >>> > } >>> > >>> > public void MapRequestA(JoinedSubClassPart<RequestA> part) >>> > { >>> > Table("RequestsA"); >>> > Map(...); >>> > Map(...); >>> > } >>> > >>> > public void MapRequestB(JoinedSubClassPart<RequestB> part) >>> > { >>> > Table("RequestsB"); >>> > Map(...); >>> > Map(...); >>> > JoinedSubClass<RequestBB>("RequestID", MapRequestBB); >>> > } >>> > >>> > public void MapRequestBB(JoinedSubClassPart<RequestBB> part) >>> > { >>> > Table("RequestsBB"); >>> > Map(...); >>> > } >>> > >>> > } >>> > >>> > I dont have any issues with saving RequestA. But when I create and >>> > save RequestBB, nothing gets populated in the RequestsB table. In >>> > fact, I looked at the insert and the select statements, the RequestsB >>> > table does not get called at all. >>> > >>> > When I do a select to fetch all RequestBB items, the query does an >>> > inner join between the Requests table and the RequestsBB table and >>> > completely ignores the RequestsB table. >>> > >>> > When I do a select to fetch all RequestB items, then the query does an >>> > join between the Requests table and the RequestsB table. >>> > >>> > I am not sure what I am doing wrong >>> > >>> > thanks >>> >>> >> >> >> > > > -- > - Hudson > http://www.bestguesstheory.com > http://twitter.com/HudsonAkridge > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
