0

The issue is a self referencing schema such as employee has a supervisor that is an employee. This is tracked with a FK of supervisor_id in the employees table. The FKS is described below:

"fks": [
    {
      "referencedTableName": "employees",
      "name": "supervisor_id_fks",
      "label": "Supervisor",
      "foreignKeyNames": [
        "supervisor_id"
      ],
      "referencedKeyNames": [
        "id"
      ],
      "reverseLabel": "Subordinate"
    }

Once deployed, the FKS association and the reverse are available in the select options, however, these items are not selectable. Please let me know if there is something I am missing.

Hoffmania
  • 45
  • 4

1 Answers1

0

I'm afraid it is a bug/missing feature.

There is code to unravel joins when you get back to the same join table.

Please could you raise a ticket: https://github.com/salk31/RedQueryBuilder/issues ?

Any more background to your use case would be helpful. e.g. Do you only ever want/need the user to go one level deep?

salk31
  • 995
  • 2
  • 8
  • 13
  • I think only one level is appropriate. I'm looking for a simple supervisor/subordinate lookup, nothing more. – Hoffmania Nov 19 '14 at 19:29
  • The behaviour is definitely poor (it shouldn't show those options if it is just going to collapse them). One work around, not sure how bad it smells, is to tell RQB about another view. Maybe called supervisor... That might particularly be good if you only want your users to do one level. – salk31 Nov 20 '14 at 10:55