Reputation: 2205
Through the use of nHibernate library, is there a way to set the Oracle ClientId off of the connection object? If nHibernate does not support the setting of the ClientId field, what can I do to assign a custom string to my Oracle connection object obtained from nHibernate? Thanks.
Upvotes: 1
Views: 212
Reputation: 6876
You should create a class that inherits from DriverConnectionProvider
and overrides GetConnection()
. There you can modify the IDbConnection
object. Of course you also need to configure this class in the NHibernate SessionFactory configuration, for example in hibernate.cfg.xml.
Upvotes: 1