Revision a873a3ba
Von Christian Ehringfeld vor etwa 8 Jahren hinzugefügt
src/entityinspector.cpp | ||
---|---|---|
*/
|
||
#include "entityinspector.h"
|
||
#include <QDir>
|
||
#include <QDebug>
|
||
#include <QDateTime>
|
||
using namespace CuteEntityManager;
|
||
|
||
... | ... | |
if (typeName.contains("QSharedPointer") && !relations.contains(i.key())) {
|
||
ok = false;
|
||
msg += "No relation defined for attribute " + i.key() + "!\n";
|
||
|
||
} else if (typeName.contains("QPointer")) {
|
||
ok = false;
|
||
msg += i.key() + " must use QSharedPointer.\n";
|
||
... | ... | |
&& foreign.getType() != RelationType::ONE_TO_ONE) {
|
||
ok = false;
|
||
this->logRelationTypeErrorMsg("ONE_TO_ONE", r, foreign);
|
||
|
||
} else if (r.getType() == RelationType::MANY_TO_MANY
|
||
&& foreign.getType() != RelationType::MANY_TO_MANY) {
|
||
this->logRelationTypeErrorMsg("MANY_TO_MANY", r, foreign);
|
||
... | ... | |
" for primary key not exists. Please check your getPrimaryKey() method!\n",
|
||
MsgType::CRITICAL);
|
||
}
|
||
if(metaprops.size() <= 1) {
|
||
ok = false;
|
||
this->logger->logMsg("Entity has only one attribute. Please add attributes. Otherwise you can run into problems.",
|
||
MsgType::CRITICAL);
|
||
}
|
||
return ok;
|
||
}
|
||
|
Auch abrufbar als: Unified diff
closes #614