Revision af84b9c4
Von Christian Ehringfeld vor mehr als 10 Jahren hinzugefügt
| samples/example/models/group.cpp | ||
|---|---|---|
|
#include "group.h"
|
||
|
#include "person.h"
|
||
|
#include "contact.h"
|
||
|
#include "pupil.h"
|
||
|
#include <QDebug>
|
||
|
|
||
|
Group::Group() : Entity() {
|
||
| ... | ... | |
|
|
||
|
const QHash<QString, CuteEntityManager::Relation> Group::getRelations() const {
|
||
|
auto hash = QHash<QString, CuteEntityManager::Relation>();
|
||
|
hash.insert("pupils", CuteEntityManager::Relation("pupils", RelationType::MANY_TO_MANY));
|
||
|
hash.insert("persons", CuteEntityManager::Relation("persons", RelationType::MANY_TO_MANY));
|
||
|
hash.insert("pupils", CuteEntityManager::Relation("pupils",
|
||
|
RelationType::MANY_TO_MANY));
|
||
|
hash.insert("persons", CuteEntityManager::Relation("persons",
|
||
|
RelationType::MANY_TO_MANY));
|
||
|
hash.insert("mainTeacher", CuteEntityManager::Relation("mainTeacher",
|
||
|
RelationType::MANY_TO_ONE));
|
||
|
return hash;
|
||
Auch abrufbar als: Unified diff
example update