# \#has-one

**URL:** https://community.forestadmin.com/tag/has-one/44.md

[Latest](https://community.forestadmin.com/latest.md) · [Categories](https://community.forestadmin.com/categories.md) · [Tags](https://community.forestadmin.com/tags.md)

---

## [HasOne relationship should display error if the foreignKey is set but the key belongsTo doesn't exist](https://community.forestadmin.com/t/hasone-relationship-should-display-error-if-the-foreignkey-is-set-but-the-key-belongsto-doesnt-exist/598)

<div class="topic-metadata">

**Author:** [@Liam\_Cheung](https://community.forestadmin.com/u/Liam_Cheung)\
**Replies:** 1\
**Last updated:** [July 3, 2020, 3:45pm UTC](https://community.forestadmin.com/t/hasone-relationship-should-display-error-if-the-foreignkey-is-set-but-the-key-belongsto-doesnt-exist/598 "2020-07-03T15:45:27Z")

</div>

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…
