mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-05-08 01:29:23 -05:00
exposed Model/Related types on Relation classes
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user