Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Move] Add Transfer::transfer_object_to_id #737

Merged
merged 1 commit into from
Mar 10, 2022
Merged

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Mar 10, 2022

Often we need to construct a parent object and at the same time set one of the fields as a ChildRef as a proof of owning another object. This cannot be done today because to get a child ref we must first transfer an object to the parent object. But the parent object is still being created, thus the dilemma.
This PR adds a new API transfer_object_to_id in Transfer module that allows us to transfer an object to an object ID (which represents the parent object). With this, to do what we wanted to do, we could then first create a new ID for the parent object, transfer the child object into the id, and then construct the parent object with the child ref.

@lxfind
Copy link
Contributor Author

lxfind commented Mar 10, 2022

This PR touches a lot of places just because I turned on a typo checker.
The only real meaningful change is the addition of the new function in Transfer module.

@lxfind lxfind merged commit b2afe2b into main Mar 10, 2022
@lxfind lxfind deleted the transfer-object-to-id branch March 10, 2022 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants