Does it really matter if it's a descendant of DataObject or not?
Well of course it matters in some way since it doesn't work, but the other DataObjectManagers work on Sitetree and Sitetree inherits DataObject so Sitetree is a DataObject too.
I have the relationships working now by using checkBoxSetField on the belongs_many_many-side. This solution was bugging before and that's why I tried using the ManyManyDataObjectManager on the belongs_many_many pages.
To explain what I'm trying to do, I have two page types that are related to eachother, Products and Accessories. Products have the relationship $many_many and Accessories has the $belongs_many_many. The reason I tried this is because I want to be able to define the relationships when I make the Accessory, not just on the product side.
Anyways, it's only the ManyManyDataObjectManager and it's ComplexField equivalent that throw the error, it actually kind of works if you use the hasManyDataObjectManager on the belongs_many_many-side. You can't actually manage the relationship but the DataObjectManager shows up and doesn't give an error.
What I am thinking is that this is some kind of bug since you get an empty javascript dialog. Could you point me to the code that figures out what it's supposed to be fetching or is there some other way I can see what is happening and causing the error?
I really think that the manymany-managers (yours and the original) should work if you're using it on the page that has $many_many or on the page that has the $belongs_many_many. After all, it should be pretty much the same functionality, the connection table is there after all and all that should have to be done is reverse it.
The scenario I am working from here is that even though one is $many_many and the other one is $belongs_many_many the system needs to treat them more equal than in a has_one -> has_many. I pretty much have it working now with the checkBoxSetField but your DataObjectManager looks alot cooler ;)