tags:

views:

48

answers:

1

Given an entity instance, how do I get mapping information like table name, identifier column name, number of columns, etc?

+1  A: 

Configuration.GetClassMapping. PersistentClass has all the mapping info. Examples of PersistentClass manipulation:

Mauricio Scheffer
Thanks, I wanted to retrieve, during run time, mapping info of entities that is already mapped using regular hbm.xml. And I justfound ISessionFactory.GetClassMetadata().
Olonarp