Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

SS3.0.2 Remove Relations instead of Objects on ModelAdmin remove action


Go to End


2 Posts   1363 Views

Avatar
b.ear

Community Member, 1 Post

6 October 2012 at 1:47am

After setting up two new DataObjects with a many to many relationship and bringing them to the frontend with ModelAdmin the data are displayed well. Also I can add new objects and bring them in relation to each other.

Now, I have the problem that if I remove a relationship the object related is removed and not only the relationship.

I wonder if this is a bug or the normal behavior and if it is not a bug how can I change it so that the object in the database is kept and only the relationship will be removed?

Thanks for your help.

Avatar
digibrains

Community Member, 130 Posts

20 October 2012 at 1:18pm

Edited: 20/10/2012 2:03pm

Did you find an answer for this?

I'm having a similar issue. This seems like a bug not a feature?

EDIT: Just after I replied to your post I found this:
http://www.silverstriperesources.com/articles/silverstripe-3-many-many-a-comprehensive-example/

Turns out it is a feature.

--
Chris