support memory optimized table in mssql dialect for 2016

Description

I would like to make use of "memory optimized table" feature of MSSQL 2016. I do not see how to do this using hibernate.

see https://visualstudiomagazine.com/articles/2018/09/01/memory-optimized-tables.aspx

Environment

Microsoft SQL Server

Activity

Show:
Richard Conover
December 19, 2019, 8:54 PM

Status? Upgrading from hibernate 3 to 5.4.8.Final results in error:

javax.persistence.TransactionRequiredException: Executing an update/delete query

when trying to create Memory Optimized Table outside of a user transaction.

FYI, trying to create a Memory Optimized Table inside a user transaction results in SQL Server returning this error:

caused by: com.microsoft.sqlserver.jdbc.SQLServerException: DDL statements ALTER, DROP and CREATE inside user transactions are not supported with memory optimized tables.

Richard Conover
December 19, 2019, 10:09 PM

Found that setting this:

<prop key="hibernate.allow_update_outside_transaction">true</prop>

That the error: javax.persistence.TransactionRequiredException: Executing an update/delete query

goes away and the memory optimized table is created.

Assignee

Unassigned

Reporter

Carsten Hammer

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure