Skip to content

Commit

Permalink
[TASK] #101554 - Remove MM_hasUidField (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
brotkrueml authored Oct 24, 2023
1 parent f2bca76 commit 74834da
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 57 deletions.
23 changes: 11 additions & 12 deletions Documentation/ColumnsConfig/CommonProperties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ element in a section.
Related configurations
======================

.. _tca_property_MM_hasUidField:

.. confval:: MM_hasUidField

:type: boolean
:Scope: Proc.

If the "multiple" feature is used with MM relations you **must** set this value
to true and include a UID field.
Otherwise sorting and removing relations will be buggy.


.. confval:: MM_match_fields

:type: array
Expand Down Expand Up @@ -107,6 +95,17 @@ Related configurations
The above example uses the special field quoting syntax :php:`{#...}` around
identifiers to be as :ref:`DBAL <t3coreapi:database>`-compatible as possible.


.. _tca_property_MM_hasUidField:
.. confval:: MM_hasUidField

.. versionchanged:: 13.0
This setting is obsolete. Remove all occurrences of :php:`MM_hasUidField`
from TCA. The :sql:`uid` column is added as primary key automatically,
if :php:`multiple = true` is set, otherwise a combined primary key of
fields :sql:`uid_local`, :sql:`uid_foreign` plus eventually
:sql:`tablenames` and :sql:`fieldname` is used.

.. _tca_property_MM_auto_creation_mm_table:

Auto creation of intermediate MM tables from TCA
Expand Down
26 changes: 13 additions & 13 deletions Documentation/ColumnsConfig/CommonProperties/Multiple.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
.. include:: /Includes.rst.txt
.. _tca_property_multiple:
.. include:: /Includes.rst.txt
.. _tca_property_multiple:

========
multiple
========

.. confval:: multiple
.. confval:: multiple

:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: boolean
:Scope: Display / Proc.
:Types: :ref:`group <columns-group>`, :ref:`select <columns-select>`
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: boolean
:Scope: Display / Proc.
:Types: :ref:`group <columns-group>`, :ref:`select <columns-select>`

Allows the *same item* more than once in a list.
Allows the *same item* more than once in a list.

If used with bidirectional MM relations it must be set for both the native
and foreign field configuration.
If used with bidirectional MM relations it must be set for both the native
and foreign field configuration.

The property :ref:`MM_hasUidField <tca_property_MM_hasUidField>` must be set
whenever `multiple` is used. Otherwise sorting and removing relations will
be buggy.
.. versionchanged:: 13.0
The property :ref:`MM_hasUidField <tca_property_MM_hasUidField>` is
obsolete. It had to be defined previously when using `multiple`.
23 changes: 12 additions & 11 deletions Documentation/ColumnsConfig/Type/Group/Properties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,6 @@ MM
Related configurations
======================

.. _columns-group-properties-mm-hasuidfield:
.. confval:: MM_hasUidField (type => group)

:type: boolean
:Scope: Proc.

If the :ref:`multiple <tca_property_multiple>` property is set with MM
relations you **must** set this value to :php:`true` and include a UID field.
Otherwise, sorting and removing relations will be buggy.


.. _columns-group-properties-mm-match-fields:
.. confval:: MM_match_fields (type => group)

Expand Down Expand Up @@ -142,4 +131,16 @@ Related configurations
around identifiers to be as :ref:`DBAL <t3coreapi:database>`-compatible as
possible.


.. _columns-group-properties-mm-hasuidfield:
.. confval:: MM_hasUidField (type => group)

.. versionchanged:: 13.0
This setting is obsolete. Remove all occurrences of :php:`MM_hasUidField`
from TCA. The :sql:`uid` column is added as primary key automatically,
if :php:`multiple = true` is set, otherwise a combined primary key of
fields :sql:`uid_local`, :sql:`uid_foreign` plus eventually
:sql:`tablenames` and :sql:`fieldname` is used.


.. todo: add Examples
19 changes: 10 additions & 9 deletions Documentation/ColumnsConfig/Type/Inline/Properties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@ MM
and `New->newB`. Deleting the relation `New->orgA` will result in a
broken relation `Org->orgA`.

.. confval:: MM_hasUidField (type => inline)

:type: boolean
:Scope: Proc.

If the :ref:`multiple <tca_property_multiple>` property is set with MM
relations you **must** set this value to :php:`true` and include a UID field.
Otherwise, sorting and removing relations will be buggy.


.. confval:: MM_opposite_field (type => inline)

Expand All @@ -69,6 +60,16 @@ MM
:sql:`sys_refindex`.


.. confval:: MM_hasUidField (type => inline)

.. versionchanged:: 13.0
This setting is obsolete. Remove all occurrences of :php:`MM_hasUidField`
from TCA. The :sql:`uid` column is added as primary key automatically,
if :php:`multiple = true` is set, otherwise a combined primary key of
fields :sql:`uid_local`, :sql:`uid_foreign` plus eventually
:sql:`tablenames` and :sql:`fieldname` is used.


Examples
========

Expand Down
23 changes: 11 additions & 12 deletions Documentation/ColumnsConfig/Type/Select/Properties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,6 @@ Select field with foreign table via MM table
Related configurations
======================

.. confval:: MM_hasUidField (type => select)

:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: boolean
:Scope: Proc.

If the :ref:`multiple <tca_property_multiple>` property is set with MM
relations you **must** set this value to :php:`true` and include a UID field.
Otherwise, sorting and removing relations will be buggy.


.. _columns-select-properties-mm-match-fields:
.. confval:: MM_match_fields (type => select)

Expand Down Expand Up @@ -119,7 +108,7 @@ Related configurations

Additional where clause used when reading MM relations.

Example:
Example:

.. code-block:: text
Expand All @@ -128,3 +117,13 @@ Related configurations
The above example uses the special field quoting syntax :php:`{#...}`
around identifiers to be as :ref:`DBAL <t3coreapi:database>`-compatible as
possible.


.. confval:: MM_hasUidField (type => select)

.. versionchanged:: 13.0
This setting is obsolete. Remove all occurrences of :php:`MM_hasUidField`
from TCA. The :sql:`uid` column is added as primary key automatically,
if :php:`multiple = true` is set, otherwise a combined primary key of
fields :sql:`uid_local`, :sql:`uid_foreign` plus eventually
:sql:`tablenames` and :sql:`fieldname` is used.

0 comments on commit 74834da

Please sign in to comment.