Comments (2)
We have this terminology: Record ID (note/42
) consists of Record Type (note
) and Record Name (42
).
The _id
field contains record type information because this is how the data is transmitted from the server to the SDK. The data is passed to the constructor you mentioned so to construct a Record
. Because of this, in the forseeable future, _id
passed to this constructor will have type information because not doing so will break HTTP API compatibility.
In the realm of the JS SDK, I think the recommended approach is to get Record ID information from id
property (without _
), which returns record type + record name. You are not supposed to use or know about _id
. For this reason there is no point in “disambiguating the meaning of _id
”.
You are having problem because you are unable to pass a Record
into the constructor to create a new object (i.e. the copy constructor you referenced in #73). To solve this problem is easy: if _id
does not contain record type information, the constructor should assume that the record type is the same as the record type when calling extend(...)
.
from skygear-sdk-js.
This should be handled in #73
from skygear-sdk-js.
Related Issues (20)
- Drop realm
- Unable to import defaultContainer in v2.0.0-alpha.15 using JS SDK HOT 3
- Update API documentation
- Support OAuth and Sign in with Apple in React Native
- Include license banner in bundle
- Add identity APIs
- Support using auth ui to login with OIDC flow
- Update MFA step names
- Update using CustomTabsIntent for authorization flow in android
- Move oidc functions to another namespace HOT 1
- Update README to mention localhost DNS resolver is required
- Remove unused fields in OIDCConfiguration
- Compatibility with v2.4
- [Bug] React native auth ui treats user cancel as unable to open url error HOT 10
- How to detect cancel in authorization flow HOT 14
- Fix react native bundle warning
- React native upload asset fails in Android HOT 1
- SDK throws error when first time login/signup with facebook using auth ui HOT 2
- Allow explicitly set auth ui locale in react native sdk HOT 1
- Support providing extra query parameters to authorization URL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skygear-sdk-js.