amplication / amplication/amplication
🐛 Bug Report: default action is missing when creating a relation with a special name
- Vorherrschende Sprache
- TypeScript
- Sterne
- 16k
- Forks
- 1.5k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### What happened?
When creating a relation field with a name that is not identical to the related entity, initially the field is created as a single text field.
once the field is created, after changing the type of field to relation, and choosing the related entity - not all the default actions are created.
### What you expected to happen
the APIs for both side should be created based on the relation types (1 API for the parent, and 4 APIs for the children)
### How to reproduce
1. create two entities - customer and group
2. create some fields for each entity (do not create a relation field yet) and commit to clearing the pending changes.
3. go to the customer entity and create a new field called team.
4. change the type of the new field from single line text to relation, and choose the entity "Group" as the related entity
5. confirm and close the dialog with the details of the relation
6. The relation is created as 1-1 and we only see 1 new API (instead of 2)
7. go to the group entity and change the relation so "one group can be related to many employees". now we have 4 APIs (instead of 5)
8. go back to Employee entity
9. Change the relation so One 'Employee' can be related to many 'Team' - now we have 8 APIs ( as expected)
11. change the relation back to "One 'Employee' can be related to one 'Team'" - now we have 5 APIs (as expected)
### Amplication version
_No response_
### Environment
_No response_
### Are you willing to submit PR?
_No response_
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.