ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Filter for multiple FKs to the same table #691

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a database with two columns each of which point to the same foreign 
table 
2. Filter fails (duplicate labels)
3.

What is the expected output? What do you see instead?

Well thats the issue. Say I have a reference table called "epoch_tbl" and a 
fact table called "events_tbl", where events_tbl has fields called 
epoch_started and epoch_ended, each of which is an FK of epoch_tbl.

What would I expect to see in the filter?

At the moment it doesn't work at all, but if it did, you would see "epoch_tbl 
..." twice.

The metadata available to construct a label for this is:

"relations": {
                "birth_or_qual_year_tblparticipant_info_tbl": {
                    "referenceColumn": "ID",
                    "columns": {
                        "Year": {
                            "datatype": "BIGINT"
                        },
                        "ID": {
                            "datatype": "INTEGER"
                        }
                    },
                    "column": "UG_qual_year",
                    "referenceTable": "birth_or_qual_year_tbl"
                },
                "birth_or_qual_year_tblparticipant_info_tbl1": {
                    "referenceColumn": "ID",
                    "columns": {
                        "Year": {
                            "datatype": "BIGINT"
                        },
                        "ID": {
                            "datatype": "INTEGER"
                        }
                    },
                    "column": "Birth_year",
                    "referenceTable": "birth_or_qual_year_tbl"
                }

So an option could be "column ... referenceTable" for example.

What would make most sense to users? (Over to you Meriel!)

Original issue reported on code.google.com by scott.br...@gmail.com on 3 Jul 2015 at 11:55