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
One to many relationship fails on existing schema if many table name is 'invitation'.
We have an existing schema with many o2m relationships configured with no issue. But we have one table 'invitation' where we have an error in the relationship.
To Reproduce
with any directus version after 10.9.3 (use to work correctly before)
One table: customer
Many table: invitation
simplified schema:
createtablecustomer (
id int8 not null;
name varchar(200);
);
createtableproperty_for_rent (
id int8 not null;
name varchar(200);
);
createtableinvitation (
id int8 not null;
name varchar(200);
customer_id int8 references customer(id) on deletesetnull;
property_for_rent_id int8 references property_for_rent(id) on deletesetnull;
);
In directus create a one to many relationship on the customer to the invitation called 'invitations', and a one to many relationship on the house to the invitation called 'invitations'.
The alias field 'invitations' gets created but then directus frontend interface shows a many to many interface with empty fields.
once saved add data to to all tables and go to the customer or house table, the invitations field displays an error message: relationship not configured correctly.
We cannot edit the relationship anymore it gets locked. If we remove the alias field 'invitations' and try to recreate it we get an error telling this relation already exists. The only way to remove it is to purge the tables directus_fields, directus_relations.
I have compared the data in directus tables with other one to many relations that work correctly and they are the same. I can't figure any difference, so it seems to be a front end problem.
It seems on of the table names trigger the error.
Directus Version
v10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered:
I am unable to reproduce this problem with the information you provided on my end. I've attached a video in which I show my collection setup, that follows your description / simplified schema and the correct relationship in the invitations field of the property_for_rent collection.
Are you able to reproduce the error on a clean database?
Do you see any errors in the JavaScript Console in your browser?
Hello,
Thank you for your response.
I have no error on the frontend and no error on the backend. Please find a video showing the problem.
Is there a way to completely reconfigure a field even if it has already been configured. Deleting field reference in table directus_fields and directus_relations seems like an option, but it's not very convenient, is there another way to completely reset a field so we reconfigure it ?
Describe the Bug
One to many relationship fails on existing schema if many table name is 'invitation'.
We have an existing schema with many o2m relationships configured with no issue. But we have one table 'invitation' where we have an error in the relationship.
To Reproduce
with any directus version after 10.9.3 (use to work correctly before)
One table: customer
Many table: invitation
simplified schema:
In directus create a one to many relationship on the customer to the invitation called 'invitations', and a one to many relationship on the house to the invitation called 'invitations'.
The alias field 'invitations' gets created but then directus frontend interface shows a many to many interface with empty fields.
once saved add data to to all tables and go to the customer or house table, the invitations field displays an error message: relationship not configured correctly.
We cannot edit the relationship anymore it gets locked. If we remove the alias field 'invitations' and try to recreate it we get an error telling this relation already exists. The only way to remove it is to purge the tables directus_fields, directus_relations.
I have compared the data in directus tables with other one to many relations that work correctly and they are the same. I can't figure any difference, so it seems to be a front end problem.
It seems on of the table names trigger the error.
Directus Version
v10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: