Jaanus
Super Moderator
Hi all,
does anyone have an idea how to achieve this (if it's possible at all with Fabrik):
Let's say I have a table for facts, terms (etc) named facts (id, fact, description) and a list for it.
When writing or editing a fact I want sometimes to add one or many references to other fact(s). But so that another reference to the current fact is also created for another fact on the fly.
Most probably I have an additional table for such references. Say it's name is facts_related (id, facts_id, related_id) and I have a repeated list join for facts list (facts->facts_related, id->facts_id).
Facts (id, fact) are
1, fact 1
2, fact 2
3, fact 3
4, fact 4
and let's say fact 4 refers to all the rest in the facts_related table:
facts_id=4 related_id=1;
facts_id=4 related_id=2;
facts_id=4 related_id=3;
But in this case I have also to edit each other facts one by one if I want to make them refer back to fact 4 so each one have joined data:
facts_id=1 related_id=4;
facts_id=2 related_id=4;
facts_id=3 related_id=4;
It seems I need either
does anyone have an idea how to achieve this (if it's possible at all with Fabrik):
Let's say I have a table for facts, terms (etc) named facts (id, fact, description) and a list for it.
When writing or editing a fact I want sometimes to add one or many references to other fact(s). But so that another reference to the current fact is also created for another fact on the fly.
Most probably I have an additional table for such references. Say it's name is facts_related (id, facts_id, related_id) and I have a repeated list join for facts list (facts->facts_related, id->facts_id).
Facts (id, fact) are
1, fact 1
2, fact 2
3, fact 3
4, fact 4
and let's say fact 4 refers to all the rest in the facts_related table:
facts_id=4 related_id=1;
facts_id=4 related_id=2;
facts_id=4 related_id=3;
But in this case I have also to edit each other facts one by one if I want to make them refer back to fact 4 so each one have joined data:
facts_id=1 related_id=4;
facts_id=2 related_id=4;
facts_id=3 related_id=4;
It seems I need either
- an autocreation of an additional joined data
- when I create fact 4 and add joined data facts_id=4 related_id=1
then also acts_id=1 related_id=4 is created in background
- when I create fact 4 and add joined data facts_id=4 related_id=1
- or perhaps an "enhanced" ON clause that would work only in readonly mode (list and details)
- SELECT * FROM facts LEFT JOIN facts_related ON facts_related.facts_id = facts.id OR facts_related.related_id = facts.id