mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-05-03 06:59:23 -05:00
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:
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user