Mutliple tables with this package
Opened this issue · 2 comments
Hi Bruno,
I see this is an old package, anyway do you think I could create more tables within this package?
I mean for example if I have:
Products related
products alternatives
Can I simply extend the schema or I need to duplicate the whole package?
thanks!
It is not possible with the default implementation, because MigX will load the config from core/components/migxresourcerelations/migxconfigs/migxresourcerelations.config.js
and that config defines the way tables are related in the "extended":"joins"
part of the JSON.
I didn't want to make multiple copies of the same package, because that creates a lot of additional hassle with class names, separate db tables etc.
Instead I've extended the base migx class ( core/components/migx/model/migx/migx.class.php
) in a way, that I've added a special UI field that can control which config file is loaded on a per MigX config basis. This way I can have multiple configs with one package and can maintain multiple different resource relations with only one deployment of migxresourcerelations
.
Let me know if you are interested in these changes.
Hi, thanks for your reply, that sound interesting but currently I don't need anymore that implementation, I would keep it open since some other users may need it.