hibernate-reactive: MS SQL: failure when inserting row if a column has a foreign key constraint
There are many tests in the HR suite using parent/child data. For example: EagerTest.
With MS SQL, these tests fail with:
javax.persistence.PersistenceException: org.hibernate.HibernateException: io.vertx.mssqlclient.MSSQLException: Cannot insert the value NULL into column 'parent_id', table 'master.dbo.Node'; column does not allow nulls. INSERT fails.
I suspect this is due to the column definition:
[Hibernate] create table Node (id int not null, string varchar(255), version int, parent_id int, primary key (id))
Perhaps it should be explicitly declared as NULL
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (20 by maintainers)
@gavinking this didn’t have any effect.
I filed https://github.com/eclipse-vertx/vertx-sql-client/issues/963 to track the issue upstream.
Feel free to close this one. Otherwise, we can close it later when the upstream issue is resolved.
@gavinking let me check if this is due to the server config or something the JDBC driver does which the Reactive Client doesn’t.
In this case I’ll create an issue upstream and we can close this one.