From 47cd969f1084b2d85b2baff55288da0764fcf112 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 4 Feb 2020 19:50:41 +0100 Subject: [PATCH] add todo and fix docblock --- DataStorage/Database/DataMapperAbstract.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index 49de1d310..d74b5b372 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -131,6 +131,18 @@ use Throwable; * Instead of using int the NullModel should be used which has a constructor that allows to define the int. * As a result the datamapper has to be rewritten for the select and insert/update. * The select needs to set the null model as value and the insert/update needs to extract the id from the null and ignore all other empty values from the null model which obviously are the default values. + * + * @todo Orange-Management/phpOMS#235 + * The relationship keywords `dst` and `src` are difficult to understand and should be renamed. + * E.g. `self` and `ext` + * + * @todo Orange-Management/phpOMS#236 + * Consider unifing hasMany and ownsOwn + * Maybe unify these relations and handle them based on their definition of src and dst. + * 1. `src` and `dst` are defined = relation is defined in relation table + * 2. `dst` is defined = relation is defined in own table + * 3. `src` is defined = relation is defined in external table + * Disclaimer: I may have mixed up the meaning of dst and src (the names are bad) */ class DataMapperAbstract implements DataMapperInterface { @@ -211,13 +223,6 @@ class DataMapperAbstract implements DataMapperInterface protected static array $ownsOne = []; /** - * Relations. - * - * Relation is defined in current mapper - * - * @var string[] - * @since 1.0.0 - */ /** * Belongs to. * * @var array>