Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Save object WITHOUT saving relations

Hello,

I have an object1 with a "belongs to" relation to the object2. I'm looking for a way to save object1, without saving object2.

Any idea ?

Thanks

It seems that it is because we access to the relation directly as $object2->relationTo1 instead of $object2->getRelationTo1()

Any idea on how to change this ?



22.3k
Accepted
answer

Can you offer an example?

As far as I can tell if I save an object it saves just that. If I update its relationships then those will be saved too.