Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for case differences in DBPM contributor #6698

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

jamesagnew
Copy link
Collaborator

This change fixes 2 regressions caused by Database Partitioning Mode:

  • The mapping contributor was accidentally case sensitive when comparing table and column names, which meant that it could miss columns when running in an environment using lower-case identifiers (this is the case in the JPA Starter project)
  • Several partitioned foreign keys in the terminology tables were not set as insertable=false which caused them to fail when used in non-DBPM mode.

Copy link

Formatting check succeeded!

Copy link
Contributor

@dotasek dotasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This passes all integration tests and smoke tests on hapi-fhir-jpaserver-starter.

However, there is an exception that appears during initialization.

To replicate, build hapi-fhir-jpaserver-starter, and then run it with the following command:

mvn -P jetty spring-boot:run

I can see the following in the startup log:

Error executing DDL "create index IDX_IDXCMPSTRUNIQ_RESOURCE on hfj_idx_cmp_string_uniq ()" via JDBC [Syntax error in SQL statement "create index IDX_IDXCMPSTRUNIQ_RESOURCE on hfj_idx_cmp_string_uniq ([*])"; expected "identifier";]

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create index IDX_IDXCMPSTRUNIQ_RESOURCE on hfj_idx_cmp_string_uniq ()" via JDBC [Syntax error in SQL statement "create index IDX_IDXCMPSTRUNIQ_RESOURCE on hfj_idx_cmp_string_uniq ([*])"; expected "identifier";]

This doesn't appear to be fatal, as the server still starts, and smoke tests run successfully, but there could be some other undiagnosed breakage that this causes.

Copy link
Contributor

@dotasek dotasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subsequent commits have fixed the exceptions on jpa startup. Looks good to me!

@jamesagnew jamesagnew merged commit 6b4acc3 into rel_8_0 Feb 11, 2025
62 of 65 checks passed
@jamesagnew jamesagnew deleted the ja_20250210_account_for_case_differences_in_dppm branch February 11, 2025 15:28
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (rel_8_0@a579d8f). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             rel_8_0    #6698   +/-   ##
==========================================
  Coverage           ?   83.59%           
  Complexity         ?    28648           
==========================================
  Files              ?     1798           
  Lines              ?   111335           
  Branches           ?    13979           
==========================================
  Hits               ?    93068           
  Misses             ?    12269           
  Partials           ?     5998           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants