From 0f8137f940bf04bf33151e4ca3418f9b783d49ec Mon Sep 17 00:00:00 2001 From: Sebastian Lenz Date: Wed, 18 Nov 2020 18:10:14 +0100 Subject: [PATCH] Correctly set valueType on foreign fields --- src/foreignField/ForeignField.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/foreignField/ForeignField.php b/src/foreignField/ForeignField.php index 29c38af..b279195 100644 --- a/src/foreignField/ForeignField.php +++ b/src/foreignField/ForeignField.php @@ -454,5 +454,11 @@ public static function supportedTranslationMethods(): array { public static function t(string $message): string { return Craft::t('site', $message); } -} + /** + * @inheritdoc + */ + public static function valueType(): string { + return static::modelClass(); + } +}