forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Foreign Key Moving To
- This topic is empty.
-
AuthorPosts
-
-
February 4, 2015 at 10:40 am #13317avilMember
Good feature is to show foreign key-field as clickable link in quer result or table-result view. When we click on it then we open related record inside related table.
-
February 4, 2015 at 1:02 pm #35202peterlaursenParticipant
It is there. Click twice on a cell where a FK constrant applies and an “…” button will appear. Please see image.
[attachment=2011:fklookup.jpg]
Release notes of SQLyog 9.0 (April 2011):Features:— Added an option (in GRID and FORM view) to look up/search valid values for columns having Foreign Key CONSTRAINTS. -
May 12, 2015 at 4:52 pm #35203dinfinityMember
It is not there. At least, not in the way avil meant.
The current foreign key feature is already extremely useful, especially if you use UUID based primary keys.
The suggested foreign key feature is to be able to continue the process and thus ‘navigate’ through the database.
Suppose a database schema with a Document referencing a User referencing an Organisation referencing an Address.
With the current feature, you cannot go from Document to Address without copy-pasting the intermediate foreign keys in some filter. It only works for inspecting records that are one step away.
With the suggested feature, one would be able to open the referenced table (with filter enabled) in a view in which you can consequently open other FK references and continue the process indefinitely.
I do believe the original implementation should also be accessible, as it is useful for assigning a value (and I don’t see how such functionality could be implemented naturally if the result is shown in a separate table data view or in the query result view).
-
May 13, 2015 at 11:38 am #35204peterlaursenParticipant
OK, but what should the implemenation be like exactly?
We can only have one non-persistent DATA tab (a non-persistent DATA tab is the one the shows the latest table selected in Object browser). However we have an option for persistent DATA tabs as well. So think it would be possible to open the parent table in such (from context menu, for instance in order not to waste space in the GRID). The actual row may then be preselected/highlighted here.
However you may not have considered that there could be more than one row in parent table that is the parent. MySQL allows a for many-to-may relationships with a non-unique index on parent column. In that case there is not (or may not be) one specific row on target that can be consisered the parent row. All rows with same value in target would be equally much parents here. Any idea how to handle this?
Maybe also you can tell exactly how you would use such feature and why?
-
-
AuthorPosts
- You must be logged in to reply to this topic.