Database Relationship and Foreign Key Errors in Base44
Your Base44 app uses related database tables (for example, a Users table linked to an Orders table), but the relationships are not working correctly. Related records don't appear in linked views, creating a record in one table doesn't properly reference the related record in another, or deleting a record causes unexpected cascade effects.
This issue often manifests as dropdown selectors for related records showing empty lists, detail pages failing to display linked data, or errors when trying to create records that reference other tables.
Relationship issues can be subtle and may only appear with certain data combinations or when the related tables grow beyond a small number of records.
Error Messages You Might See
Common Causes
- The relationship field type is incorrectly configured (e.g., using a text field instead of a proper reference/relation field)
- The referenced record was deleted but the foreign key reference still exists, creating orphaned records
- The relationship direction is inverted: the link field is on the wrong table
- The relation field references the wrong column (e.g., referencing a name field instead of the unique ID)
How to Fix It
Review your table schemas and ensure that relationship fields use Base44's proper relation/reference field type, not a plain text or number field storing IDs manually. The built-in relation type handles the linking automatically.
Check the direction of the relationship: a one-to-many relationship (e.g., one User has many Orders) requires the link field on the "many" side (Orders), not on the "one" side (Users).
For existing apps with broken relationships and orphaned records, a developer can help clean up the data and reconfigure the schema correctly without losing existing records.
Real developers can help you.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get HelpFrequently Asked Questions
Why don't my linked records show up in Base44?
Make sure you're using Base44's relation field type, not a plain text field. The relation field type automatically handles the linking and display of related records.
How do I fix orphaned records in Base44?
Orphaned records occur when a referenced record is deleted. You may need to clean up the orphaned references manually or set up cascade rules to handle deletions automatically.