'New' means 'new', not 'clone'
(cherry picked from commit 662351e05270799f939fee59132dd8a3f361225a)
Fix #938
(cherry picked from commit 1f468630adf86b83615eab093babd83d3571f142)
Added unit test
(cherry picked from commit a87701ffbb88ea41a4714c79e2dcf0fed2b20c7d)
Fixed tests
(cherry picked from commit 023d349dbb46c45e4d1b10ecdb44c15679d0f6a9)
Merge pull request #966 from sjinks/has_many_to_many

[1.2.2] Fix broken hasManyToMany()