Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision abb9e8c5

Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt

  • ID abb9e8c5d716850adf461b0742da96c6e4030526
  • Vorgänger f6a3fe0a
  • Nachfolger 3fd96253

example not working - wip, maybe tomorrow

Unterschiede anzeigen:

samples/example/models/group.cpp
const QHash<QString, CuteEntityManager::Relation> Group::getRelations() const {
auto hash = QHash<QString, CuteEntityManager::Relation>();
hash.insert("pupils", CuteEntityManager::Relation("pupils", MANY_TO_MANY));
//hash.insert("pupils", CuteEntityManager::Relation("pupils", MANY_TO_MANY));
hash.insert("persons", CuteEntityManager::Relation("persons", MANY_TO_MANY));
hash.insert("mainTeacher", CuteEntityManager::Relation("mainTeacher",
MANY_TO_ONE));
return hash;
......
void Group::setMainTeacher(const QSharedPointer<Person> &value) {
mainTeacher = value;
}
QList<QSharedPointer<Person> > Group::getPersons() const {
return persons;
}
void Group::addPerson(Person *person) {
this->persons.append(QSharedPointer<Person>(person));
}
void Group::setPersons(const QList<QSharedPointer<Person> > &value) {
persons = value;
}

Auch abrufbar als: Unified diff