Hi everyone,
I have currently a use case in mind where having scriptable dblist queries could possibly be handy, not sure, but I was wondering if this is something that was considered already / if it could be beneficial to others, if not too complex to implement. The idea would be to allow the usage of Velocity code in the Database List class property query field. The provided query would then get evaluated before executing the query itself, so that the query could be refined depending on the context where it is used.
Example: movies, represented by MovieClass, consist of several stages (StageClass). Several movie pages get created in distinct spaces, and MovieClass contains a dblist property pointing at StageClass instances. When editing a movie, only the stages that are in the same location as the current movie should be listed, not all the ones existing in the wiki. Typically in that situation, having a dblist clause such as and doc.location like '$doc.space%'
or something along this line could spare creating a custom displayer or resorting to other more advanced techniques.
What do you think?
Cheers