Skip to content

Confusing results if duplicate fields names in map results #53

@blaix

Description

@blaix

If you have a query with a join and the field names aren't unique, you get confusing results:

For example:

select foo.id, bar.id from foo inner join bar on (foo.id = bar.foo_id)

results in:

"resultHeaders": ["id", "id"],
"resultSet": [{ "id": 2 }]

The solution is to make sure you alias fields with unique names, or use "resultFormat": "list". But if you do use map and have duplicate fields, the result isn't very usable since there is lost data and ambiguous field names, so perhaps it should raise an error?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingws4sql

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions