Skip to content

How to use Oracle.ManagedDataAccess.Core driver with Nhibernate 5? #2906

Closed
@maulik-modi

Description

@maulik-modi

How can we use https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/ for project targeting .NET 5(Cross platform deployment) and Oracle 12c Database?

I can see that https://github.com/nhibernate/nhibernate-core/tree/master/src/NHibernate/Driver folder has OracleManagedDataClientDriver.cs file using Oracle.ManagedDataAccess driver.

namespace NHibernate.Driver
{
	/// <summary>
	/// A NHibernate Driver for using the Oracle.ManagedDataAccess DataProvider
	/// </summary>
	public class OracleManagedDataClientDriver : OracleDataClientDriverBase
	{
		/// <summary>
		/// Initializes a new instance of <see cref="OracleManagedDataClientDriver"/>.
		/// </summary>
		/// <exception cref="HibernateException">
		/// Thrown when the <c>Oracle.ManagedDataAccess</c> assembly can not be loaded.
		/// </exception>
		public OracleManagedDataClientDriver()
			: base("Oracle.ManagedDataAccess")
		{
		}

		public override bool HasDelayedDistributedTransactionCompletion => true;
	}
}

Questions

  1. Do I simply create a new class inheriting from OracleDataClientDriverBase and referencing "Oracle.ManagedDataAccess.Core" and it works OR there are some other changes required to get it working?
  2. How about Nhibernate 5 comatibility with this new driver - Oracle.ManagedDataAccess.Core , I can see that @bahusoid PR Add Oracle to GitHub Actions #2848 has been merged, Does it mean most tests are being passed in here? What dialect https://nhibernate.info/doc/nhibernate-reference/session-configuration.html#configuration-optional-dialects are you using in your tests?
    image

@bahusoid , @fredericDelaporte , @hazzik , your thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions