-
Notifications
You must be signed in to change notification settings - Fork 17
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
Upgrade ember 2.12+. Using mirage for testing. Adding shallow copying #27
Conversation
@lazybensch Pls review |
Definitely appears to be the most productive of the merges. |
Does this one happen to fix the inverse relationships issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fully support these changes.
Big 👍 from me on this - would be great to see this merged |
if(emberTypeOf(option) === 'object') { | ||
this._applyOptions(option, get(copy, optionName)); | ||
} else { | ||
set(copy, optionName, option); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing a crash at this line of Assertion Failed: You must pass an array of records to set a hasMany relationship
when attempting to make a copy of a complex record (with several relationships), where I had been attempting to skip copying a relationship by passing in an options object like { relationshipName: null }
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you fork my forked repo and provide a test? I'll have a look into it then.
Need any help here to get this merge? |
I feel like a good way forward would be to merge this PR as is, and then we can create smaller PR's to fix any issues that arise. It's also easier to just point |
First, thanks for this great package. I use it a lot in my administration interfaces.
However, I stumbled upon some issues and began to refactor and improve. The following changes were made:
Copyable
mixinDS.FixtureAdapter
and replaced it withember-cli-mirage
copy
andshallowCopy
)