aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_reminders/lib/Db
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-08-19 16:43:17 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-10-17 18:31:42 +0200
commitee02e3246dc18a6390cd9fbfd7b66f441e71ccc1 (patch)
tree3ebd0a84988aa677e6d8ffc6a057079a4140c6fc /apps/files_reminders/lib/Db
parent40fd76f69e601ab5579e8ce9b81318d3924dd463 (diff)
downloadnextcloud-server-ee02e3246dc18a6390cd9fbfd7b66f441e71ccc1.tar.gz
nextcloud-server-ee02e3246dc18a6390cd9fbfd7b66f441e71ccc1.zip
feat(AppFramework): Add full support for date / time / datetime columns
This adds support for all Doctrine supported types, for the column types only the immutable variants needed to be added. But especially those types are the important ones, as our **Entity** class works by detecting changes through setters. Meaning if it is mutable, changes like `$entity->date->modfiy()` can not be detected, so the immutable types make more sense here. Similar the parameter types needed to be added. `Enity` and `QBMapper` needed to be adjusted so they support (auto map) those types, required when insert or update an entity. Also added more tests, especially to make sure the mapper really serializes the values correctly. Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files_reminders/lib/Db')
-rw-r--r--apps/files_reminders/lib/Db/ReminderMapper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_reminders/lib/Db/ReminderMapper.php b/apps/files_reminders/lib/Db/ReminderMapper.php
index 16859585bdf..35421656da2 100644
--- a/apps/files_reminders/lib/Db/ReminderMapper.php
+++ b/apps/files_reminders/lib/Db/ReminderMapper.php
@@ -135,7 +135,7 @@ class ReminderMapper extends QBMapper {
$qb->select('id', 'user_id', 'file_id', 'due_date', 'updated_at', 'created_at', 'notified')
->from($this->getTableName())
->where($qb->expr()->eq('notified', $qb->createNamedParameter(true, IQueryBuilder::PARAM_BOOL)))
- ->andWhere($qb->expr()->lt('due_date', $qb->createNamedParameter($buffer, IQueryBuilder::PARAM_DATE)))
+ ->andWhere($qb->expr()->lt('due_date', $qb->createNamedParameter($buffer, IQueryBuilder::PARAM_DATETIME)))
->orderBy('due_date', 'ASC')
->setMaxResults($limit);