drawdb
drawdb copied to clipboard
Add circular type dependency detection
Description
Adds validation to detect circular dependencies in custom types and shows proper error messages in the issues panel.
Problem
When users create custom types that reference each other (e.g., type_1 has a field of type_2, and type_2 has a field of type_1), no error was shown. This could lead to invalid type structures.
Solution
- Added
checkCircularTypesfunction to detect type reference loops - Added proper translation keys for the error message
- Shows clear error: "Circular type dependency involving type 'X'"
How to Test
- Go to Types tab in sidebar
- Create
type_1with a field of typetype_2 - Create
type_2with a field of typetype_1 - Check Issues panel - should show circular dependency error
Type of Change
- [x] Bug fix (adds missing validation)
- [x] Enhancement (improves user experience)
Fixes missing validation for circular type references.
FIxes Show error for circular type references #615