silverstripe/silverstripe-framework — pull request #2498 by jkempff (2013-10-06 15:41:52+00:00)
Title: fixed wrong ID output for many_many and has_many relations

JSONDataFormatter spits out the wrong ID for `has_many` and `many_many` relations.

This is a confusing bug, since the `$fieldName` is set before, when looping through the `->has_one()` relations and leaves a "random" value left for the `->has_many()` and `->many_many()` loops.