Content


NTL
Core
IDbRelation

IDbRelation



This interface describes minimum required functionality from Active Record model relation.

You can find more information in comments below.

class IDbRelation : public virtual IReleasable
{
protected:
    String m_sName; // Relation name 
    CDbBaseActiveRecord *m_pParent; // Parent Active Record model 
        
    virtual void LoadRelations(std::vector<CDbBaseActiveRecord *> &parent_models, std::vector<CDbBaseActiveRecord *> &out_models) = 0; // Load relations 

    IDbRelation(const String &name, CDbBaseActiveRecord *parent);
        
    // Following helper methods are used to modify Active Record model 
    void setActiveRecordNew(CDbBaseActiveRecord *model, const bool value) const;
    void setActiveRecordPrimaryKey(CDbBaseActiveRecord *model, const DbActiveRecordPrimaryKey &value) const;
    void setAttributeValue(IDbAttribute *attr, const DbValue &value);
public:
    String const &sName; // Relation name 
};
Namespace: nitisa
Include: Nitisa/Interfaces/IDbRelation.h