You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where you can see that President ISA Person, hence by ER logic a president should always be able to reach the fields of the person he refers, but person should not be able to see its president.
When with VSCODE i format the code (Ctrl+Shift+i on Ubuntu), I obtain this:
modelPersona {uidString@id@default(uuid())codice_fiscaleString?nomeStringcognomeStringsessoSessodata_nascitaDateTimeluogo_di_nascitaLuogoDiNascita?residenzaResidenza?domiciliDomicilio[]creata_ilDateTime@@map("persona")PresidentePresidente[]// This should not be added}
Firstly, it is not true that a Person can be more than a President, secondly I do not want at all that the field president is added to Person.
Suggested solution
The easiest solution would be able to disable from options this feature, so that when I indent the code, the code is only linted but not "improved" by adding the second part of a relation.
Alternatives
An alternative could be able to configure from settings how and when the second part of a relation would be added.
The text was updated successfully, but these errors were encountered:
Update: After having some experience, I suggest adding the field to all the sides of the relation, there was really no reason not to do it. I still would prefer a warning instead of them added automatically.
Problem
I am always frustrated when I have something like this:
Where you can see that President ISA Person, hence by ER logic a president should always be able to reach the fields of the person he refers, but person should not be able to see its president.
When with VSCODE i format the code (Ctrl+Shift+i on Ubuntu), I obtain this:
Firstly, it is not true that a Person can be more than a President, secondly I do not want at all that the field president is added to Person.
Suggested solution
The easiest solution would be able to disable from options this feature, so that when I indent the code, the code is only linted but not "improved" by adding the second part of a relation.
Alternatives
An alternative could be able to configure from settings how and when the second part of a relation would be added.
The text was updated successfully, but these errors were encountered: