jackalope / jackalope-doctrine-dbal

Doctrine DBAL transport implementation for Jackalope
http://jackalope.github.io
Other
143 stars 60 forks source link

Fix reordering of namespaced children fails #367

Closed esserj closed 4 years ago

esserj commented 4 years ago

We are running into an issue where reordering namespaced nodes fails because of the following issue:

When you have 2 namespaced nodes under the same parent Client::reorderChildren is trying to sort them by concatenating namespace and nodename, the namespace in de nodes table is stored as the uri of the namespace instead of the prefix (namespace table primary key). In several locations in the client the uri is fetched and used for nodes queries, but in the reorder is it not.

The related api test in OrderBeforeTest::testNodeOrderNamespaces passed because the DBUnitFixturesXML was importing the prefix into the namespace instead of the uri (as the library is doing).

Fixing both Client and import now passes these tests and ensures namespaced nodes get reordered as expected