Open Paroca72 opened 1 year ago
Thanks for the suggestion!
We could enable this by exposing InternalBoxAccess.relPut
(directly or through a helper class). Changing ToMany
itself does not seem a good idea as it is a list of objects.
A potential workaround: if the objects to be added all have an ID (e.g. the ID is not zero or null) it should be possible to just add objects with an ID set (and other values null or default) and save.
If others would like to have this feature, please thumbs up the first comment! This helps us track interest.
Hello,
It should be very useful to have inside
ToMany
class a methodaddId
to add the entity reference directly by the id. Now have justadd
that force the programmer to insert a whole entity. But in many case what have are the ids and this force to load all the related entities before can add them as relations.the
ToOne
already provide this function passing bytargetId
.Thanks Sam