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

Update-MdbcData : Cannot bind parameter 'Update' to the target. #32

Closed
mgeorgebrown89 opened this issue Nov 9, 2019 · 2 comments
Closed

Comments

@mgeorgebrown89
Copy link

I set the data with a PSObject just fine, like so:

@{_id = $ManifestEntry.ReleaseNumber; Value = $ManifestEntry } | Add-MdbcData

Then when I go to update it:

Update-MdbcData @{_id = $manifestEntry.releaseNumber }  @{'$set' = @{value = 
$manifestEntry } }

It gives me this error:

Update-MdbcData : Cannot bind parameter 'Update' to the target. Exception setting "Update": ".NET type System.Management.Automation.PSObject cannot be mapped to a BsonValue."

Am I missing something here? or is the Update-MdbcData cmdet not ready?

I'm really liking what I see so far. It's been very helpful!

@nightroman
Copy link
Owner

@mgeorgebrown89 Thank you for reporting this. Yes, there is a recent bug, the fix is coming.

Regardless, mind case sensitive names. In the examples, on adding data you are using Value =, on updating value =. In PowerShell they are the same but in Mdbc and driver they are different.

@nightroman
Copy link
Owner

Fixed in v6.0.2

nightroman added a commit that referenced this issue Nov 10, 2019
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

No branches or pull requests

2 participants