gkrid / dokuwiki-plugin-structjoin

GNU General Public License v2.0
1 stars 0 forks source link

join with multi-value fields #1

Open juliusverrel opened 5 years ago

juliusverrel commented 5 years ago

Thank you for addressing the important issue of joining schemas! In our wiki data base, it would be great to use join with multi-value fields. The specific use case is:

In schema Event, I created a join field ProjectUsers (schema: Project, field: Members). However this naive code

---- struct table ----
schema: Event
cols: %pageid%
filter: ProjectUsers *~ user.name
----

yields this error:

Field dokuwiki\plugin\struct\meta\Schema project (132) DATA.Members is a multi field - not allowed for lookup

This is an error from struct plugin, not structjoin, raised here.

Unfortunately, I don't yet understand enough about struct (and Dokuwiki and PHP...) to judge how difficult it would be to solve this. But it would be of great help.

cgalo5758 commented 4 years ago

This suggestion makes sense.

juliusverrel commented 4 years ago

Any ideas/attempts of implementing this feature? It would help us a lot

solewniczak commented 4 years ago

@juliusverrel I've reproduced your setup and understood what you mean. This is not very easy to implement but should be possible. I think that the best idea here would be to run separate query for each row of multi-join filed, that performs many-to-many relation with duplicates removal. I'll let you know when I find a way how to do it.

juliusverrel commented 4 years ago

thank you very much!

Juergen-aus-Zuendorf commented 3 years ago

For me, it would also be a great help if this would work

Regards Juergen