Specify different table name in configuration (NHibernate 2.1)
35 views
Skip to first unread message
Werner Clausen
unread,
Feb 2, 2012, 3:27:36 AM2/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhu...@googlegroups.com
Hi,
I'm using NHibernate 2.1.0.4000 indirectly through NServiceBus. NServiceBus has a class called "Subscription" that implements ClassMap<Subscription>. NServiceBus uses NHibernate to serialize that class to MSSQL and I guess NHibernate uses the class name as table names. From what I can Google, it would be possible to change the table name using "Table(string tableName)" in the ClassMap constructor. But as I do not want to change NServiceBus code, I wonder if it is possible to change the table name in configuration? For example in the Dictionary<string, string> that NServiceBus injects into NHibernate?