IClassMetadata mapping = ISessionFactory.GetClassMetadata(typeof(T)); // null if no mapping...
string nameProperty = mapping.IdentifierPropertyName; /Pete From: [email protected] [mailto:[email protected]] On Behalf Of Sean Farrow Sent: 13 May 2013 12:52 To: '[email protected]' Subject: [nhusers] Mapping questions Hi, I have two questions regarding mapping: Firstly given a class T, is there any code in NHibernate, or has anyone written any to determine whether a mapping exists for this class. Secondly, if a mapping exists, is there a way to access it's details-i.e. what the name of the id property is? Cheers Sean. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
