YES ! We should update as much as possible and clearly we should update
the parent.
This has caused me issues many times when working on some projects..
The fix should not actually be that difficult.. Is not in one query
(this would not be compatible with future storage systems).
But with "where doc.parent='...'" and then for (doc in search) {
doc.setParent() doc.save() }
That is not a too difficult fix for the renaming.
I'm not sure if we already have a jira for that.
Ludovic
Caleb James DeLisle a écrit :
Hello all,
I noticed that when a document is renamed, it's "child" documents
don't have their parent values updated. It looks like just a few lines
of code, maybe an hql
ALTER XWikiDocument doc WHERE doc.parent = '"+oldName+"' SET
doc.parent
= '"+newName+"'
Is this too messy?
I think a loop with doc.doc.setParent(newName) and doc.save() would be
too resource intensive with databases which fsync every transaction.
Should we bother to even ask the user the way it asks to update links?
Should we update #includeForm, #includeInContext, and #includeTopic as well?
What are your thoughts?
~Caleb James DeLisle
I'm new here, let me know if I posted in the wrong section
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Ludovic Dubost
Blog:
http://blog.ludovic.org/
XWiki:
http://www.xwiki.com
Skype: ldubost GTalk: ldubost