Skip to content

[proposal] Update transformer-builder - #1587

Open
lelkadi wants to merge 2 commits into
balderdashy:masterfrom
lelkadi:update-transformer-unserialize
Open

[proposal] Update transformer-builder#1587
lelkadi wants to merge 2 commits into
balderdashy:masterfrom
lelkadi:update-transformer-unserialize

Conversation

@lelkadi

@lelkadi lelkadi commented Dec 7, 2018

Copy link
Copy Markdown

In the unserialize(), only transform pRecord's columns that match model's attributes.
Or in other words, skip any fields available in the pRecord that don't match any attribute of the Model.

In the unserialize(), only transform pRecord's columns that match model's attributes. 
Or in other words, skip any fields available in the pRecord that don't match any attribute of the Model.
@sailsbot

sailsbot commented Dec 7, 2018

Copy link
Copy Markdown

Hi @lelkadi! It looks like your pull request title doesn’t quite conform to our guidelines. Please edit the title so that it starts with [proposal], [patch], [fixes #], or [implements #]. Once you've fixed it, post a comment below (e.g. "ok, fixed!") and we'll take a look!

@lelkadi lelkadi changed the title PROPOSAL: Update transformer-builder [proposal] Update transformer-builder Dec 7, 2018
@lelkadi

lelkadi commented Dec 7, 2018

Copy link
Copy Markdown
Author

ok, fixed!

@lelkadi

lelkadi commented Dec 7, 2018

Copy link
Copy Markdown
Author

I think this proposed change is essential for an ORM, as it allows more control on the data on the Model level.

Changing let keyword to var, in transformer's unserialize(), for backward compatibility with old JS versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants