fix: geometry missing from generated provider config due to key collision and case mismatch#508
Merged
Conversation
azahnen
approved these changes
May 20, 2026
azahnen
pushed a commit
that referenced
this pull request
May 20, 2026
…sion and case mismatch (#508)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes ldproxy/editor#27
Three related bugs caused geometry to be silently dropped from generated provider/collection configs:
Key collision in SqlDbmsAdapterPgis.getGeoInfo: The geometryInfos map was keyed only by table name. When the same table name existed in multiple schemas (e.g. ALKIS, AFIS, ATKISBDLM), later entries overwrote earlier ones. Fixed by changing the key to schema.table (lowercased via Locale.ROOT).
Case-sensitive geometry type detection in SchemaGeneratorSql.getFeaturePropertyType: PostgreSQL/SchemaCrawler reports the column data type as geometry (lowercase), but the check was "GEOMETRY".equals(...) — an exact case-sensitive match that always evaluated to false. This caused the geometry column to be silently discarded as UNKNOWN type. Fixed by using equalsIgnoreCase and normalizing to uppercase before WktWkbGeometryType.valueOf(...).
Lookup key case mismatch: The map stores keys like alkis.o02310 (lowercase) but SchemaGeneratorSql was looking up ALKIS.o02310 (SchemaCrawler returns the schema name in original case), so lookups always missed. Fixed by applying .toLowerCase(Locale.ROOT) at both lookup sites.