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

Provide the destination object in a PreCondition overload #2727

Closed
jez9999 opened this issue Jul 21, 2018 · 5 comments · Fixed by #2728
Closed

Provide the destination object in a PreCondition overload #2727

jez9999 opened this issue Jul 21, 2018 · 5 comments · Fixed by #2728
Labels
Milestone

Comments

@jez9999
Copy link
Contributor

jez9999 commented Jul 21, 2018

I want to implement a side-effect during my PreCondition mapping of setting a boolean on the destination object, and it has to be done at the PreCondition phase because it depends on the order of the objects being traversed starting from the initial object and expanding into referenced objects, in that order. At the moment there is no overload lambda of PreCondition that gives me access to the destination object. Could we add one?

@lbargaoanu
Copy link
Member

A PR is welcome. Similar to this.

@jez9999
Copy link
Contributor Author

jez9999 commented Jul 21, 2018

Yeah, I was thinking it looked pretty simple to pass in _destination - so much so that I wondered whether there was an architectural reason why that overload didn't exist. Like, is it just building a graph of booleans of "whether to map this member" at the PreCondition stage, so the destination object hasn't been created yet, or something? Or is it just an oversight?

@lbargaoanu
Copy link
Member

Check the execution plan. But other than that, it seems fair that who needs the overload should implement it :)

@jez9999
Copy link
Contributor Author

jez9999 commented Jul 21, 2018

Created PR.

@jbogard jbogard added this to the v.Next milestone Jul 21, 2018
@lock
Copy link

lock bot commented May 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants