This document explains how copy and paste works if you copy an object
that has a foreign key relationship, but you don't copy the target of that relationship.
This works both within a document and between documents
Note that if you copy objects within a document, or between documents then the object will copied as an object (It isn't converted to SQL text in this case).
SQLEditor stores both object data and SQL text on the clipboard at the same time.
As an alternative to copy/paste you can also drag with the option or alt key held down.
This is the base document. We're going to select and copy just Table1
This is the new document. Note how this Table2 is different from the Table2 in the first document. (Although it does have the same field id to link to)
If you paste Table1 into this document it should automatically find and connect to the table Table2 in this document.
Even though it is a different object to the one in the original document, because you didn't copy the original target and there is no other alternative, SQLEditor assumes that you want to use the existing Table2.
If you copy both sides of the relationship and paste them somewhere then that specific relationship is retained.
This happens even if there is an object with the same name as one or both of the new objects.
In this example Table2 already exists, but we paste in the two objects from the original document.
This results in the new Table2 becoming Table2_1 to avoid a conflicting name, however despite this, the connection
remains between Table1 and Table2_1
Yes, the object names must match exactly on both table and field/column names for the matching to work.
Finally, if all else fails and SQLEditor can't figure it out, you can always reconnect the objects manually.
This works otherwise in exactly the same way
To contact us with a support issue please email: