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!

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/tMdYd1bcwVcJ.
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/nhusers?hl=en.

Reply via email to