Hi!
I'm wondering if there's a way to add and remove references to other DataObjects in ModelAdmin without creating/deleting the DataObject.
Imagine the following scenario:
I have Students and a many to many relation with Exams. So students are connected to several Exams which are connected to several Students. A typical bidirectional Many-To-Many relationship.
I want to use ModelAdmin to manage these relationships.
But as it is a Many-To-Many relationship ModelAdmin shows me a "Exams" tab when I go on the Students ModelAdmin-page.
(If it were a one-to-many relationship the Exams would be referenced with a select-box, which allows me to add or remove a reference to an Exam.)
On the Exams-tab on the other hand, I can just create and delete (not add and remove) whole Exams DataObjects. So therefore I can't really manage my many-to-many relationship as I can't add multiple references of the same Exam to different Students.
For example when I delete an Exam of a Student because it doesn't belong to him, then the Exam will be completely deleted (for all students).
As I'm quite new to Silverstripe I'm just wondering if there's another way to manage those many-to-many relationships.
best regards
Andreas