disableConstraints=true for H2 executes non-H2 SQL Statement
See original GitHub issueI am using h2 version 2.0.202 and DBRider 1.32.0.
When I use @DataSet(value = "datasets/mydataset.yml", disableConstraints = true)
, this line will run a SET foreign_key_checks=0
statement, which is not supported by H2.
Instead, the command should be SET REFERENTIAL_INTEGRITY FALSE
per documentation: https://www.h2database.com/html/commands.html#set_referential_integrity
So currently, I cannot use DataSets which would violate foreign key constraints.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
H2 Dababase not executing sql query - spring boot
I am executing the query INSERT INTO ROLE VALUES (1, "ADMIN"); and its giving me an error Column "ADMIN" not found; SQL statement:...
Read more >Running H2 in SQL Server Mode With Custom Schema Name ...
I want to use in-memory database but at the same time I don't want my tests to fail as soon as I use...
Read more >Advanced - H2 Database Engine
The transaction is marked 'prepared' by executing the SQL statement PREPARE COMMIT transactionName; The transaction can now be committed or rolled back; If...
Read more >Statement.execute throws Syntax error (206/210)
to H2 Database. This was not the case in 200. Syntax error in SQL statement "create table persons (mstb_per_no int [*]identity not null,...
Read more >SQL Server Utilities Statements - GO - Microsoft Learn
These commands can be used to facilitate the readability and execution of batches and scripts. GO signals the end of a batch of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yea, can you create a new issue @Matrino? also, it would be nice if we could reproduce in one of the DBRider samples.
Thanks for the feedback!
In my projects, we haven’t encountered any errors after upgrading.
@Matrino It’s probably not related to disableConstraints but another DBRider feature. Maybe it’s caused by your own project files? I can’t find anything with
INDEX_COLUMNS
in this project.It’s probably best if you create a new bug report for your issue since it doesn’t match my reported one.