PHPackages                             wdb/trigger-sort-mm-table - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wdb/trigger-sort-mm-table

ActiveTypo3-cms-extension[Database &amp; ORM](/categories/database)

wdb/trigger-sort-mm-table
=========================

This TYPO3 extension includes most relevant TCA configuration to demonstrate and test a MySQL-Trigger.

v1.0.0(4y ago)02GPL-2.0-or-laterPHP

Since May 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/DavidBruchmann/trigger-sort-mm-table)[ Packagist](https://packagist.org/packages/wdb/trigger-sort-mm-table)[ RSS](/packages/wdb-trigger-sort-mm-table/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Trigger Sorting MM Demo
=======================

[](#trigger-sorting-mm-demo)

This extension includes most relevant TCA configuration to demonstrate and test a MySQL-Trigger.

This is the described problem:

> In my extension I have two models team members (parent) and expertise (child). The bidirectional relationsship between the two models is stored in an intermediate table. This works fine bit there is one problem.
>
> When I edit the team member record in the TYPO3 Backend and assign an expertise record to it and then open the corresponding expertise record, the newly assigend team member record is shown at the top of the list instead of at the end. The problem also occurs the other way around.
>
> This is because the sorting respectively sorting\_foreign field in the intermediate table is set to its default value (0) when the record is saved.

[This is the link](https://stackoverflow.com/questions/71844437/typo3-10-exbase-bidirectional-mn-relation-sorting)to the Stack Overflow question, and [this to my answer](https://stackoverflow.com/a/72135267/1019850).

Installation
------------

[](#installation)

`composer req wdb/trigger-sort-mm-table`

To install the trigger look in the file `ext_tables_static+adt.sql`. It might be possible that it can be installed with TYPO3 in the extension manager, else copy the SQL and execute it in PhpMyAdmin or another DBMS.

The extensionKey is `btp` and the namespace `\WDB\Btp` due to the namings in the question on Stack Overflow.

Usage
-----

[](#usage)

On any page in the TYPO3 backend you can create Team- and Expertise-records. In each of them you can chose or create some records of the other kind. To monitor what's happening the best is to control in the mm-table in PhpMyAdmin.

These are the tables:

- tx\_btp\_domain\_model\_team
- tx\_btp\_domain\_model\_expertise
- tx\_btp\_team\_expertise\_mm

The table `tx_btp_team_expertise_mm` includes a debug field that is filled by the trigger with some relevant values when the trigger is active.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1468d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cd8989c5c9dc55b469d80c9e51c58fa9064eb72271d7610d278f6aed5fb52f7?d=identicon)[David Bruchmann](/maintainers/David%20Bruchmann)

---

Top Contributors

[![DavidBruchmann](https://avatars.githubusercontent.com/u/999146?v=4)](https://github.com/DavidBruchmann "DavidBruchmann (5 commits)")

### Embed Badge

![Health badge](/badges/wdb-trigger-sort-mm-table/health.svg)

```
[![Health](https://phpackages.com/badges/wdb-trigger-sort-mm-table/health.svg)](https://phpackages.com/packages/wdb-trigger-sort-mm-table)
```

###  Alternatives

[in2code/migration

Framework for any kind of TYPO3 migrations and imports. Also exports and imports content from and to json files.

6277.0k3](/packages/in2code-migration)[lolli/dbdoctor

TYPO3 Database doctor - Find and fix TYPO3 database inconsistencies

43103.5k](/packages/lolli-dbdoctor)[friendsoftypo3/typo3db-legacy

TYPO3\_DB compatibility layer

12521.7k5](/packages/friendsoftypo3-typo3db-legacy)[bmack/site-importer

Imports records from a Yaml file structure into the TYPO3 database

2383.2k](/packages/bmack-site-importer)[stefanfroemken/mysqlreport

Analyze and profile your TYPO3 databases queries

1314.9k](/packages/stefanfroemken-mysqlreport)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
