You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgranding from surreal.js 0.x.x to 1.x.x, it's common to cast string parameters as RecordId class. However, some of those values already come as a RecordId, causing mistakes in casting the recordId twice e.g.
newRecordId('table',newRecordId('table','id'))
This, instead of proper errors, causes weird behavior in surrealdb.
Describe the solution
The class creation should fail if the id or table parameters are instanceof RecordId with a proper error.
Is your feature request related to a problem?
When upgranding from surreal.js 0.x.x to 1.x.x, it's common to cast string parameters as RecordId class. However, some of those values already come as a RecordId, causing mistakes in casting the recordId twice e.g.
This, instead of proper errors, causes weird behavior in surrealdb.
Describe the solution
The class creation should fail if the id or table parameters are
instanceof RecordId
with a proper error.Alternative methods
OR maybe it should parse it correctly.
SurrealDB version
1.4.2 for windows on x86_64
SurrealDB.js version
1.0.0-beta.4
Contact Details
netd777@gmail.com
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: