Closed Jeevan-J closed 1 month ago
@Jeevan-J One option could be to capture the DDL statements that are being generated in a SQL file, and then use Flyway to execute those DDL statements, instead of letting Hibernate do that. That would also allow you to manually add START BATCH DDL
/ RUN BATCH
statements at the most appropriate places.
We'll also look into whether there is an automated solution for this.
@Jeevan-J What I don't quite understand is that it seems like the application is only trying to create the foreign keys in this DDL batch. Normally, Hibernate creates both the tables and all primary keys in one batch. Have you already created the tables in some other way first? Or are you doing something else in order to only generate the foreign key constraints?
Closing due to lack of customer response. Please reopen with requested clarification by olavloite@ if this is still an issue.
ERROR: INVALID_ARGUMENT: Too many DDL statements that require data validation in request. Limit 10.
We are trying to configure GCP Cloud Spanner for HAPI FHIR JPA server using JDBC. Using the latest version from HAPI JPA Starter Project.
We have included the Spanner Driver and Dialect dependencies in pom.xml and updated the
application.yaml
file to use Spanner database.Updated configuration (partial, rest of config remains same) looks like these:
When I start the application, it creates all the tables and stops while creating the foreign keys. It fails when trying to run a batch ddl with alter table statements.
and errors out
Are any possible ways to handle this within the dialect or hibernate settings? We have tried to set
hibernate.jdbc.batch_size
but that doesn't seem to work.