Having a bag mapped like this:
<bag name="Addresses" table="address" cascade="all-delete-orphan"> <key column="employee"/> <element column="address"/> </bag>How can I get at runtime the table name in which the addresses are stored?
If the collections generic type was a NHibernate mapped class I could have done it like this:
var tableName = (sessionFactory.GetClassMetadata(itemType) as SingleTableEntityPersister).TableName;But in this case the collections generic type is just a string and I couldn't find any way to retrieve the table name from the metadata.
original question: http://stackoverflow.com/q/11885054/750216
Thank you!