Connecting to Databricks via Simba Odbc Driver #3551
Unanswered
blk99cobra18103
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It seems the database or accessing that database through ODBC does not yield back the affected row count, which causes NHibernate to consider the operation was unsuccessful. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m utilizing nHibernate/Unit of Work/Repository pattern to connect to a sql server database. The solution is built in a .net 6 c# blazor app. Everything works great.
There is a company directive to move to databricks so I’ve been trying to integrate nHibernate with the Simba ODBC driver. I’m able to pull data from my databricks tables. The issue arises when I try to insert/update records. When I call my unitOfWork.Commit() method, the data is added/updated in databricks. The problem arises when I continue to step through the code. I’m receiving the following errors right after the commit call.
Inserting Error: Nhibernate.StaleStateException ‘Unexpected row count -1; expected 1’.
Updating Error: Nhibernate.StaleObjectStateException: 'Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)
Note there is only one transaction happening, there are no other transactions involved. I’ve also tried to implement ‘versioning’ in my table/model/mapping class to no avail.
Any ideas on where to begin to trouble shoot would be greatly appreciated?
Beta Was this translation helpful? Give feedback.
All reactions