orm made Relation::m_related NotNull

The Relation::m_query and TinyBuilder::m_query should also be NotNull,
but I can't make it work, compilation fails. 🫤
This commit is contained in:
silverqx
2024-08-02 13:32:57 +02:00
parent 6add06e395
commit a97e3a87ac
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -723,7 +723,7 @@ namespace Orm::Tiny::Relations
template<class Model, class Related, class PivotType>
void BelongsToMany<Model, Related, PivotType>::touch() const
{
const auto &related = this->m_related;
const auto &related = this->m_related.get();
const auto &key = related->getKeyName();
+1 -1
View File
@@ -190,7 +190,7 @@ namespace Relations
/*! The parent model instance. */
NotNull<Model *> m_parent;
/*! The related model instance. */
std::shared_ptr<Related> m_related;
NotNull<std::shared_ptr<Related>> m_related;
/*! The key name of the related model. */
QString m_relatedKey;
// TODO next would be good to use TinyBuilder alias instead of Builder silverqx