Add objects to ToMany by ID only
Hello,
It should be very useful to have inside ToMany class a method addId to add the entity reference directly by the id.
Now have just add 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 by targetId.
Thanks Sam
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.
Is this feature to be added?
@m-moqbel This is currently not possible. You already added thumbs up to the first post, thank you! This helps us track interest.