Revision f5b682e0
Von Christian Ehringfeld vor mehr als 9 Jahren hinzugefügt
src/entitymanager.cpp | ||
---|---|---|
}
|
||
|
||
EntityManager::EntityManager(const QString &databaseType, QString databasename ,
|
||
QString hostname,
|
||
QString username,
|
||
QString password, QString port, bool logQueries) : QObject() {
|
||
QString hostname, QString username, QString password, QString port,
|
||
bool logQueries) : QObject() {
|
||
auto db = new Database(databaseType, this->createConnection(), hostname,
|
||
databasename, username,
|
||
password,
|
||
... | ... | |
|
||
|
||
void EntityManager::oneToOne(const QSharedPointer<Entity> &entity,
|
||
const Relation &r,
|
||
const QMetaProperty &property, const bool refresh,
|
||
const Relation &r, const QMetaProperty &property, const bool refresh,
|
||
const QVariant &id) {
|
||
if (r.getMappedBy().isEmpty()) {
|
||
this->manyToOne(entity, id, property);
|
src/querybuilder.cpp | ||
---|---|---|
QRegularExpressionMatchIterator i = reg.globalMatch(type, 0,
|
||
QRegularExpression::PartialPreferFirstMatch);
|
||
short s = 0;
|
||
bool ok = false;
|
||
QString before = "";
|
||
while (i.hasNext() && s < 2) {
|
||
before = i.next().captured();
|
||
if (tMap->contains(before)) {
|
||
ok = true;
|
||
}
|
||
if (ok) {
|
||
return before.replace(QRegularExpression::escape("/\\(.+\\)/"),
|
||
"(" + i.next().captured() + ")");
|
||
}
|
src/schema.h | ||
---|---|---|
QSharedPointer<QHash<QString, QString>> abstractTypeMap;
|
||
QHash<QString, QSharedPointer<TableSchema>> tables;
|
||
QSharedPointer<QueryBuilder> queryBuilder;
|
||
|
||
|
||
};
|
||
}
|
||
#endif // SCHEMA_H
|
Auch abrufbar als: Unified diff
fix