Try this:
 
http://weblogs.asp.net/ricardoperes/archive/2012/02/02/nhibernate-metadata.aspx

On Thursday, August 9, 2012 3:29:39 PM UTC+1, Freeman wrote:

> 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/-/_6CRTXgMMmoJ.
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