Disable repeatable relationship automatic linked models creation? #741
Replies: 2 comments
-
Hey @julienmru I think AFAIK, HasMany shouldn't be deleting and recreating, as it runs Maybe something is not properly setup, or you are using some previous buggy version? You can check that with If you want to keep exploring this and/or entity false does not work for you have a look at the HasMany relation docs Let me know if that helps. Cheers |
Beta Was this translation helpful? Give feedback.
-
Hi @julienmru did you have a chance to check about @pxpm answer? Please, let us know if you need anything else. Meanwhile, i will close the issue, but please feel free to re-open or create a new one if needed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I updated an old project on Backpack 4.1 where I had custom code to create children items on a
repeatable
field.Here's my setup:
I have
Event
model & crud controller, on which I set a repeatable for a fielddates
:Date
is also a model, with the relation defined inEvent
:Let me know if that's not clear : )
Here's my issue:
Backpack has evolved (well done!) and automagically creates the items in a relation when using a
repeatable
field (from theEvent
controller to theDate
model in my case) but it's not working as I'd expect it to work because it deletes all linkedDate
and creates new ones, thus changing my IDs.Long story short, is there a way to disable the creation on linked models in Backpack? I'd like to keep some logic at my end.
Beta Was this translation helpful? Give feedback.
All reactions