[xwiki-devs] [VOTE] Use current database instead of current document database in Current*ReferenceResolver
Hi devs, Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document. Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component. In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on. So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name. Here is my +1 -- Thomas Mortagne
On Mon, Feb 8, 2010 at 18:17, Thomas Mortagne <[email protected]> wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
All Current*ReferenceResolver except CurrentMixedStringDocumentReferenceResolver which is a special backward compatibility resolver.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
-- Thomas Mortagne
-- Thomas Mortagne
+0 Thanks, Marius Thomas Mortagne wrote:
On Mon, Feb 8, 2010 at 18:17, Thomas Mortagne <[email protected]> wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
All Current*ReferenceResolver except CurrentMixedStringDocumentReferenceResolver which is a special backward compatibility resolver.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
-- Thomas Mortagne
On Feb 8, 2010, at 6:17 PM, Thomas Mortagne wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
Yes but that's why the Current Mixed resolver was created.... However it was created as a backward compatibility resolver and we actually need the current wiki for valid use cases (not just for backward compat) so +1 from me. If you plan to do this before the 2.2 release then you should to do a search to see where current resolvers are used and verify it's not going to cause any problem in the existing code. Thanks -Vincent
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
-- Thomas Mortagne
On Mon, Feb 8, 2010 at 18:34, Vincent Massol <[email protected]> wrote:
On Feb 8, 2010, at 6:17 PM, Thomas Mortagne wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
Yes but that's why the Current Mixed resolver was created....
The main reason for Current Mixed resolver was mainly the special handling of document name.
However it was created as a backward compatibility resolver and we actually need the current wiki for valid use cases (not just for backward compat) so +1 from me.
If you plan to do this before the 2.2 release then you should to do a search to see where current resolvers are used and verify it's not going to cause any problem in the existing code.
Thanks -Vincent
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
-- Thomas Mortagne
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Mon, Feb 8, 2010 at 18:34, Vincent Massol <[email protected]> wrote:
On Feb 8, 2010, at 6:17 PM, Thomas Mortagne wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
Yes but that's why the Current Mixed resolver was created....
However it was created as a backward compatibility resolver and we actually need the current wiki for valid use cases (not just for backward compat) so +1 from me.
If you plan to do this before the 2.2 release then you should to do a search to see where current resolvers are used and verify it's not going to cause any problem in the existing code.
IMO we already have issue we did not seen because of the way current resolver works.
Thanks -Vincent
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
-- Thomas Mortagne
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 2/8/10 6:17 PM, Thomas Mortagne wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
+0 Jerome.
On 02/08/2010 06:17 PM, Thomas Mortagne wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
+1 Will it first try to use the current document, then the current wiki if no current document exists? -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Tue, Feb 9, 2010 at 17:43, Sergiu Dumitriu <[email protected]> wrote:
On 02/08/2010 06:17 PM, Thomas Mortagne wrote:
Hi devs,
Currently when the reference does not contains any wiki name it's resolved using the wiki of the current document.
Problem is that we generally use context wiki as the current wiki and references used to be resolved that way before the refactoring using official Resolver component.
In many places we set the wiki we want to work on before doing a bunch of tasks: loading documents, executing queries etc... the problem is that when Current*ReferenceResolver is used you have to create some empty document and put it in the context just to set the wiki you want to work on.
So i propose to change the behavior of all the Current*ReferenceResolver to get context wiki as default wiki name.
Here is my +1
+1
Will it first try to use the current document, then the current wiki if no current document exists?
No, as it's said in the title it's about using current database INSTEAD of current document database.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (5)
-
Jerome Velociter -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol