`get` properties break record merging
See original GitHub issueIn Collection#add
when onConflict === 'merge'
the utils.deepMixin
is called on records, but when a record has a property with only getter it breaks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Procedure for Splitting or Merging Property
Our office will split or merge your property as long as you supply us with the legal description. Our office will not create...
Read more >Dividing and Merging Lots - NYC.gov
Apportionment and Merger Filing ... July 2, 2019 - New rules and policies for obtaining final tax lots for properties that have applied...
Read more >Duplicate Records - How to Merge Attributes from 2...
I merged 2 separate shps into one master shp. Now, I have a shp that contains many duplicate records. Each shp contained some...
Read more >How do I avoid large number of svn:mergeInfo when merging ...
I am trying to keep a feature branch up to date by merging trunk into the branch. Problem is, that about 2000 files...
Read more >Mastering: Matching and Merging - Documentation - MarkLogic
Matching determines if two records are candidates for merging, based on the degree of similarity between them and the weight of the comparison....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great! Very informative, thank you very much! And thank you very, very much for js-data! 😃
You ran into this issue because of the way TypeScript compiles ES2015 classes to ES5. According to the ES2015 spec, your getter property should be non-enumerable, but TypeScript produces an enumerable property, hence why it is seen by
utils.deepMixIn
as it iterates over properties of the record.You can change it to a method, as you mentioned, or you could add a setter that does nothing, or you can modify it to be non-enumerable.
Option 1:
Option 2:
Option 3:
EDIT: Fixed typo in Option 3 code