correct datamapper self/external usage (invert)

This commit is contained in:
Dennis Eichhorn 2020-10-21 22:50:22 +02:00
parent c76fcaabcf
commit a6a02fee1b

View File

@ -81,11 +81,11 @@ final class ClientMapper extends DataMapperAbstract
protected static array $ownsOne = [ protected static array $ownsOne = [
'profile' => [ 'profile' => [
'mapper' => ProfileMapper::class, 'mapper' => ProfileMapper::class,
'self' => 'clientmgmt_client_profile', 'external' => 'clientmgmt_client_profile',
], ],
'mainAddress' => [ 'mainAddress' => [
'mapper' => AddressMapper::class, 'mapper' => AddressMapper::class,
'self' => 'clientmgmt_client_address', 'external' => 'clientmgmt_client_address',
], ],
]; ];
@ -99,14 +99,14 @@ final class ClientMapper extends DataMapperAbstract
'files' => [ 'files' => [
'mapper' => MediaMapper::class, /* mapper of the related object */ 'mapper' => MediaMapper::class, /* mapper of the related object */
'table' => 'clientmgmt_client_media', /* table of the related object, null if no relation table is used (many->1) */ 'table' => 'clientmgmt_client_media', /* table of the related object, null if no relation table is used (many->1) */
'external' => 'clientmgmt_client_media_dst', 'external' => 'clientmgmt_client_media_src',
'self' => 'clientmgmt_client_media_src', 'self' => 'clientmgmt_client_media_dst',
], ],
'contactElements' => [ 'contactElements' => [
'mapper' => ContactElementMapper::class, 'mapper' => ContactElementMapper::class,
'table' => 'clientmgmt_client_contactelement', 'table' => 'clientmgmt_client_contactelement',
'external' => 'clientmgmt_client_contactelement_src', 'external' => 'clientmgmt_client_contactelement_dst',
'self' => 'clientmgmt_client_contactelement_dst', 'self' => 'clientmgmt_client_contactelement_src',
], ],
]; ];
} }