Revision 4677e852
Von Christian Ehringfeld vor etwa 10 Jahren hinzugefügt
| src/entitymanager.cpp | ||
|---|---|---|
|
bool EntityManager::create(QSharedPointer<Entity> &entity,
|
||
|
const bool persistRelations, const bool checkDuplicate) {
|
||
|
bool rc = false;
|
||
|
if (this->checkTable(entity) && !(checkDuplicate && this->count(entity) == 0)) {
|
||
|
if (this->checkTable(entity) && !(checkDuplicate && this->count(entity) > 0)) {
|
||
|
if (persistRelations) {
|
||
|
this->savePrePersistedRelations(entity);
|
||
|
}
|
||
| src/querybuilder.cpp | ||
|---|---|---|
|
|
||
|
QString QueryBuilder::countFunction(const QString &distinctColumn) const {
|
||
|
return QString(this->countKeyword() + "(" + (distinctColumn.isEmpty() ? "*" :
|
||
|
(this->distinct()) +
|
||
|
this->schema->quoteColumnName(distinctColumn)) + ")");
|
||
|
(this->distinct() +
|
||
|
this->schema->quoteColumnName(distinctColumn))) + ")");
|
||
|
}
|
||
|
|
||
|
QString QueryBuilder::distinct() const {
|
||
Auch abrufbar als: Unified diff
fix