SOLVED: Possible bug in joined lists

Status
Not open for further replies.

dimoss

Well-Known Member
Hi

I face a strange situation in joined lists.
It seems that when updating a record of a list which is joined to another list it deletes automatically the data from the joined list.
Maybe I did something wrong but I have double checked it.
Any idea?

Thanks
 
Can you give us exact details of your set up?

Preferably with screenshots of the join settings, and information on which elements are the PK's on each table.

Also, let us know if you have any pre-filters on the list, and if so, what they are.

-- hugh
 
Hi Cheesegrits

2 lists joined.
One list is the core Joomla users tables which is left joined to another fabrik created list from jos_users.username (is unique) to fab_dinamologio.am (is unique).
There are 3 simple prefilters in the list which don't affect anything. Even if I remove these prefilters the problem remains.

The PK in the jos_users table is the 'id'.
You can see the screenshots:

pre_filter.jpg joins.jpg

Thanks.
 
Hi again

I changed the PK in the jos_users list and instead of jos_users.id I put it the 'jos_users.username' and it seems that was the solution.
But I wonder why is that? Is that mean that the FROM field in the join settings has to be the same with the PK value in the list settings?

joins2.jpg

Thanks.
 
One end of any join in Fabrik has to be the PK of the table. One of those restrictions we'll try and lift one day, but the code grew over years, with the assumption that it would always be an FK -> PK join, and changing that at this point would be, to put it mildly, tough. So really, I doubt it'll ever get changed in 3.x.

Obviously for repeat joins, the "child" has to have the FK, pointing to the PK on the parent.

For one-to-one joins, it can be either way. FK on parent pointing to PK on child, or vice versa.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top