exposed Model/Related types on Relation classes

This commit is contained in:
silverqx
2022-08-07 18:09:46 +02:00
parent 796975d595
commit c5871f42a5
7 changed files with 25 additions and 6 deletions
+3 -1
View File
@@ -28,7 +28,9 @@ namespace Orm::Tiny::Relations
const QString &relationName);
public:
/*! Related instance type passed to the relation. */
/*! Parent Model type. */
using ModelType = Model;
/*! Related type. */
using RelatedType = Related;
/*! Virtual destructor. */
+5 -1
View File
@@ -45,8 +45,12 @@ namespace Orm::Tiny::Relations
inline BelongsToMany(const BelongsToMany &) = default;
public:
/*! Related instance type passed to the relation. */
/*! Parent Model type. */
using ModelType = Model;
/*! Related type. */
using RelatedType = Related;
/*! Pivot type. */
using PivotTypeType = PivotType;
/*! Virtual destructor. */
inline ~BelongsToMany() override = default;
+3 -1
View File
@@ -25,7 +25,9 @@ namespace Orm::Tiny::Relations
const QString &foreignKey, const QString &localKey);
public:
/*! Related instance type passed to the relation. */
/*! Parent Model type. */
using ModelType = Model;
/*! Related type. */
using RelatedType = Related;
/*! Virtual destructor. */
+3 -1
View File
@@ -27,7 +27,9 @@ namespace Orm::Tiny::Relations
const QString &foreignKey, const QString &localKey);
public:
/*! Related instance type passed to the relation. */
/*! Parent Model type. */
using ModelType = Model;
/*! Related type. */
using RelatedType = Related;
/*! Virtual destructor. */
+3 -1
View File
@@ -28,7 +28,9 @@ namespace Orm::Tiny::Relations
const QString &foreignKey, const QString &localKey);
public:
/*! Related instance type passed to the relation. */
/*! Parent Model type. */
using ModelType = Model;
/*! Related type. */
using RelatedType = Related;
/*! Pure virtual destructor. */
+3 -1
View File
@@ -48,7 +48,9 @@ namespace Relations
inline Relation(const Relation &) = default;
public:
/*! Related instance type passed to the relation. */
/*! Parent Model type. */
using ModelType = Model;
/*! Related type. */
using RelatedType = Related;
/*! Pure virtual destructor. */
@@ -39,6 +39,11 @@ namespace Tiny::Relations
inline RelationProxies(const RelationProxies &) = default;
public:
/*! Parent Model type. */
using ModelType = Model;
/*! Related type. */
using RelatedType = Related;
/*! Default constructor. */
inline RelationProxies() = default;
/*! Pure virtual destructor. */