wdb/trigger-sort-mm-table
Composer 安装命令:
composer require wdb/trigger-sort-mm-table
包简介
This TYPO3 extension includes most relevant TCA configuration to demonstrate and test a MySQL-Trigger.
README 文档
README
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 to the Stack Overflow question, and this to my answer.
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
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.
wdb/trigger-sort-mm-table 适用场景与选型建议
wdb/trigger-sort-mm-table 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 wdb/trigger-sort-mm-table 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wdb/trigger-sort-mm-table 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2022-05-08