Closed lkwr closed 4 months ago
Can reproduce on my end as well. The IDs are the issue. Environment:
Platform: Desktop
OS: Windows_NT
Architecture: x86_64
WebView: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0
Version: 2.0.0
Flags: featureFlags: false, models_view: true, apidocs_view: true, themes: false, newsfeed: true
Edit: Running SurrealDB Version 1.4.2 for windows on x86_64
I did some research and found out that the origin of the problem comes from the RecordId.prototype.toJSON
function from surrealdb.js
or more precisely when converting a RecordId
to json.
By changing the function above to something like the following, thinks work as expected in surrealist: https://github.com/lkwr/surrealdb.js/commit/664d74cb9914b6c0b14328064bf2e66f6176b301
At this line, when converting the query result to json, the RecordId
instances get formatted badly which cause this bug. Maybe this helps fixing the bug.
We are aware of this issue and are working on an improved solution including the option to represent the editor in SurrealQL
This will be fixed in the next patch release
Describe the bug
Updating a record in the explorer does not work.
To Reproduce
CREATE test;
)Explorer -> Table: test -> (click newly created record)
The changes are not saved.
Expected behavior
The changes to the record in the explorer save successful.
Cause (in my opinion)
It seems the problem is caused by the badly formatted record id.
Record ids look like this in the explorer:
But when changing the record id format to the following, it saved as expected.
Environment: