Fixed ManyToMany to support A,B or B,A

Before if the type parameters were the wrong way, it would pick the correct table name but it would insert the fields in the wrong order.

This fix should fix that...

(Disclaimer: I edited this code on Github's web interface and have not tested it yet)