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
The SQL scripts generated contain the following error:
ERROR 1826 (HY000): Duplicate foreign key constraint name 'fk_PatientId'
This is because, in order to implement Treats and Log, we need to create constraints on the fly, but they need to be unique. A possibility is to add a random salt generator in order to make relationships unique, or, probably simpler, adding the relationship name as part of the constraint to avoid duplicates.
The text was updated successfully, but these errors were encountered:
Take the following erd source:
entity Doctors{
DoctorId: string key
name: string
}
entity Patients{
PatientId: string key
name: string
}
entity Tests{
TestId: string key
name: string
}
relationship Treats{
Doctors[N] -> Patients[N]
}
relationship Log{
Patients[1] -> Tests[N]
}
The SQL scripts generated contain the following error:
ERROR 1826 (HY000): Duplicate foreign key constraint name 'fk_PatientId'
This is because, in order to implement Treats and Log, we need to create constraints on the fly, but they need to be unique. A possibility is to add a random salt generator in order to make relationships unique, or, probably simpler, adding the relationship name as part of the constraint to avoid duplicates.
The text was updated successfully, but these errors were encountered: