aboutsummaryrefslogtreecommitdiff
path: root/lib/models/SimpleORMap.class.php
diff options
context:
space:
mode:
authorAndré Noack <noack@data-quest.de>2024-03-25 14:50:15 +0000
committerJan-Hendrik Willms <tleilax+github@gmail.com>2024-03-25 18:22:46 +0100
commit2c55d38bc8aebb918656b3204df8ce8bdfd2e398 (patch)
treedc955b021064eaaec27b6619b195328fbf02d30f /lib/models/SimpleORMap.class.php
parentabb64e68beaecb71a28f30469b60cb9db177d670 (diff)
Resolve #3876 "SORM: Mehrere Aliase auf die gleiche Spalte sind nicht möglich"
Closes #3876 Merge request studip/studip!2730
Diffstat (limited to 'lib/models/SimpleORMap.class.php')
-rw-r--r--lib/models/SimpleORMap.class.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/models/SimpleORMap.class.php b/lib/models/SimpleORMap.class.php
index 8f951b4..4a0caa3 100644
--- a/lib/models/SimpleORMap.class.php
+++ b/lib/models/SimpleORMap.class.php
@@ -1066,6 +1066,10 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate
} else {
$this->content_db[$field] = $content_db_value;
}
+ }
+ }
+ foreach ($this->alias_fields() as $alias => $field) {
+ if (isset($this->db_fields()[$field])) {
$this->content[$alias] =& $this->content[$field];
$this->content_db[$alias] =& $this->content_db[$field];
}