HasOne relationship should display error if the foreignKey is set but the key belongsTo doesn't exist

This is a template you can use to report issues. You can also drag images, videos and include Preformatted text

Expected behavior

In a has one relationship if the referenced document id does not exist should display the Object Id (maybe highlighted in another color to show its a broken reference?).

Actual behavior

Currently showing blank for that field so do not have the object id to investigate why the reference is broken.

Failure Logs

Please include any relevant log snippets, if necessary.

Context

Please provide any relevant information about your setup.

  • Package Version:
  • Express Version:
  • Sequelize Version:
  • Database Dialect:
  • Database Version:
  • Project Name:
1 Like

Thank you for this feedback.

I’ll share it with the team for discussion. I see your point, and this could indeed be useful.

The thing is in relational environments, relations where one end is missing are invalid.

1 Like