Skip to content

fix: geometry missing from generated provider config due to key collision and case mismatch#508

Merged
azahnen merged 3 commits into
masterfrom
editor-issue-27
May 20, 2026
Merged

fix: geometry missing from generated provider config due to key collision and case mismatch#508
azahnen merged 3 commits into
masterfrom
editor-issue-27

Conversation

@PZahnen
Copy link
Copy Markdown
Contributor

@PZahnen PZahnen commented May 20, 2026

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.

@PZahnen PZahnen requested a review from azahnen May 20, 2026 09:24
@azahnen azahnen enabled auto-merge (squash) May 20, 2026 12:40
@azahnen azahnen merged commit 1367643 into master May 20, 2026
3 checks passed
@azahnen azahnen deleted the editor-issue-27 branch May 20, 2026 12:40
azahnen pushed a commit that referenced this pull request May 20, 2026
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.

provider config generated without geometry

2 participants