ox-it / ords

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

New graphical query builder doesn't know what do when there are multiple links between 2 tables #741

Open jajwilson opened 8 years ago

jajwilson commented 8 years ago

If, for instance, several fields in a 'People' table all link to records in a 'Places' table, a select query returns no results. I'll admit I'm not too sure how this should work myself. I suppose we would need some way to let the user indicate which linked field he's interested in. Maybe instead of selecting the tables to display on-screen from a list on the right-hand side, users should select additional tables after the first one by clicking on a 'show linked table' icon by the side of fields in already displayed tables? That would give the system a way of understanding which related linked table is the one to include in the SQL.

Maybe we could just add a warning message for now saying that this is not yet supported?

scottbw commented 8 years ago

Perhaps we just have to be clear what cases we can cover with graphical querying - its there for the 80% case of simple queries; if you have something more complex, then you'll have to roll your sleeves up and craft the SQL yourself. At least the query builder will give you the skeleton of the SQL.

jajwilson commented 8 years ago

Yes, we may have to just accept this as a limitation. As you say, it will work fine in 80% of instances.

If we could add a warning message in instances where we know that a particular set of relationships, such as multiple fields in a single table referring to records in the same linked table, that will do for now.