Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] #101554 - Remove MM_hasUidField #834

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading