Added failing tests for external, fix for tests
#12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If config uses has_many to dump a set, the set’s config is not used, so attrs such as
externalare not honoured. Even usingrulesdoes not solve the problem. Using unsortedsetsarray to specify dump order solves the problem.Using extra.json from this commit as an example. The 'Album' set is configured to fetch all has_many photos. When sets are sorted as part of
dump, then the 'Album' set is dumped before the 'Photo' set, and theexternalattribute is not included.Putting 'Photo' first in the
setsarray should fix that dependancy, but doesn't if sets are sorted by class name. This patch removes the sorting of sets, and dumps them in the order defined in the config.The revised test files in this commit fail without the change to Fixtures.pm.
Whether the fix of 'not sorting' is correct solution is debatable. I believe that array order in config should be honoured, and not sorted by class name.