Get subclass type from projection with NHibernate

Posted by TigerShark on Stack Overflow See other posts from Stack Overflow or by TigerShark
Published on 2010-05-07T09:26:37Z Indexed on 2010/05/07 9:28 UTC
Read the original article Hit count: 349

Filed under:
|
|

Hi

I am trying to do a projection on a type called Log. Log references a superclass called Company. Each company type is mapped with table per subclass.

Is it possible for me to get the type of Company when I do a projection on Log? I currently have an Enum property (which is not mapped) on each subclass, so I can perform switches on Company types, but since it is not mapped to anything, I can't do a projection on it.

I have tried Projections.Property("log.Company.class") but that does not work :(

PS: I couldn't find a lot of appropriate tags for this question. If anyone have an idea for more specific tags, please tell me.

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about projection