Revision 67639b75
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
samples/example/main.cpp | ||
---|---|---|
"Mustermann", Person::Gender::MALE));
|
||
gPtr->setMainTeacher(mainTeacher);
|
||
//Persons will also persisted
|
||
e->create(groupPtr, true, true);
|
||
//e->create(groupPtr, true, true);
|
||
|
||
/** ---------------------------------
|
||
* FIND
|
||
* FIND Group
|
||
* ---------------------------------
|
||
*/
|
||
QSharedPointer<Entity> groupFindPtr = e->findById<Group *>(1);
|
||
... | ... | |
qDebug()<< "Group:" << groupFindPtr->toString();
|
||
qDebug() << "PersonSize:" << grp->getPersons().size();
|
||
qDebug() << "MainTeacher:" << grp->getMainTeacher()->toString();
|
||
|
||
/** ---------------------------------
|
||
* FIND Person
|
||
* ---------------------------------
|
||
*/
|
||
QSharedPointer<Entity> personFindPtr = e->findById(1,QString("Person*"));
|
||
e->refresh(personFindPtr);
|
||
QSharedPointer<Person> pers = personFindPtr.objectCast<Person>();
|
||
qDebug()<< "MainTeacher:" << personFindPtr->toString();
|
||
qDebug() << "GroupSize:" << pers->getGroupsMainTeacher().size();
|
||
|
||
|
||
|
||
qDebug() << "Duration:" << t.elapsed();
|
||
return 0;
|
||
}
|
Auch abrufbar als: Unified diff
not working example, caused by a bug in em