UnionOfRAD/lithium — pull request #977 by jails (2013-06-20 02:36:30+00:00)
Title: Add test case for #951.

Ok looks like I "unconsciously" corrected the #950 issue and #951 PR in the #972 during the `Source::item()` to `Model::create()` conversion.

So the obviously wrong:
```
$record[$min][$name][$field] = $conn->item($primary, $rel, $opts);
```
has been changed to:
```
$record[$min][$name][$field] = $relModel::create($rel, $opts);
```
during the #972 refactoring.

The issue was about using the name for primary and foreign keys. Since the Collection are id indexed, using the wrong classes leads to "assign" (i.e. overwrite) each elements to the same id value.