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

Reference local field #30

Closed
MrSwitch opened this issue Feb 14, 2018 · 1 comment · Fixed by #78
Closed

Reference local field #30

MrSwitch opened this issue Feb 14, 2018 · 1 comment · Fixed by #78
Labels

Comments

@MrSwitch
Copy link
Member

MrSwitch commented Feb 14, 2018

Map to another field, much like a table relationship without prefixing the table. i.e.

{
    "users": {
        "name": "displayName"
    }
}

In this example requesting the "name" would map to the "displayName" field, aka...

dare.get('users', ['name']); // SELECT displayName as name FROM users;

Usecase: If a field has been renamed it's nice to still support the old name for a while. It's already possible to do this with Generated fields within a dare.get however that is rather cumbersome.

MrSwitch added a commit that referenced this issue Aug 6, 2019
MrSwitch added a commit that referenced this issue Aug 7, 2019
* feat(field_alias): Map field aliases to data in get request, #30

* feat(field_alias): Map field aliases to data in patch request, #30

* feat(field_alias): Map field aliases to data in 'del' request, #30

* feat(field_alias): Map field aliases to data in 'dare.post' request, #30

* spec(field_alias): update get spec, #30

* fix(field_alias): fix aliasing references, #30

* docs(field-alias): update field alias docs, #30

* refactor(field-alias): rename spec file, #30

* refactor(field-alias): standardize getting field attributes, #30

* fix(field-alias): ensure that join detection does not use the field alias, #30

* refactor(field-alias): tidy based on feedback, #30

* refactor(field-alias): tidy based on @cboyce183 feedback, #30
MrSwitch pushed a commit that referenced this issue Aug 7, 2019
# [0.32.0](v0.31.4...v0.32.0) (2019-08-07)

### Features

* **Field Alias:** Enable aliasing field names ([#78](#78)) ([9d530d2](9d530d2)), closes [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30) [#30](#30)
@MrSwitch
Copy link
Member Author

MrSwitch commented Aug 7, 2019

🎉 This issue has been resolved in version 0.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants