BUGFIX Properly identify the foreign class in a many many relationship w...

...hen building the schema

The first item in the array returned by DataObject#many_many is the parent class, not the foreign class, so we need to retrieve the second item of that list.