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

Extensions in Contained Resources Not Unmarshaled Correctly #116

Open
cjduffett opened this issue Feb 16, 2017 · 1 comment
Open

Extensions in Contained Resources Not Unmarshaled Correctly #116

cjduffett opened this issue Feb 16, 2017 · 1 comment

Comments

@cjduffett
Copy link
Contributor

This is a known issue when retrieving resources that inherit from DomainResource and have one or more contained resources. As these resources are unmarshaled from the database the exact type of the contained resources is not known, so they are unmarshaled into the generic interface{} type.

This unmarshaling operation names the fields in this interface{} exactly as they are in the database, meaning the id is actually _id, and the fields used to store the extension (@context, @id, @type) remain that way.

The _id field is corrected to id in the web layer before being returned to a client, but the extensions are not.

@eug48
Copy link

eug48 commented Mar 13, 2018

This should be fixed by #134 which makes use of the BSONMapToResource function you added last year.

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