Revision 977d8d5f
Von Christian Ehringfeld vor etwa 8 Jahren hinzugefügt
src/entitymanager.cpp | ||
---|---|---|
}
|
||
|
||
quint32 EntityManager::count(const QSharedPointer<Entity> &entity, bool ignoreID,
|
||
bool followInheritance) {
|
||
bool joinBaseClasses) {
|
||
Query q = Query();
|
||
auto qb = this->schema->getQueryBuilder();
|
||
QHash<QString, QVariant> values;
|
||
if (followInheritance) {
|
||
if (joinBaseClasses) {
|
||
q.appendJoins(qb->joinBaseClasses(entity));
|
||
values = EntityHelper::getEntityAttributes(EntityHelper::getMetaProperties(
|
||
entity.data()), entity);
|
src/entitymanager.h | ||
---|---|---|
bool createTable(QString className, bool createRelationTables = true);
|
||
bool removeTable(QString className);
|
||
quint32 count(const QSharedPointer<Entity> &entity, bool ignoreID = true,
|
||
bool followInheritance = false);
|
||
bool joinBaseClasses = false);
|
||
quint32 count(const QString &tableName);
|
||
QSharedPointer<Database> getDb() const;
|
||
void setDb(const QSharedPointer<Database> &value);
|
Auch abrufbar als: Unified diff
changed param name of count method to clarify functions
closes #621