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
I have a scemafull with a field defined as string and if I set it to a string which is in the form of a record (e.g. test:string) then it throws an exception. There is a workaround in surrealql, but I don't know how to do that in this SDK.
Minimal replication example:
usingSurrealDb.Net;usingSurrealDb.Net.Models.Auth;publicclassTest{publicrequiredstringName{get;set;}}vardb=newSurrealDbClient("ws://127.0.0.1:8000/rpc");awaitdb.SignIn(newRootAuth{Username="root",Password="root"});awaitdb.Use("test","test");conststringtableName="test";awaitdb.RawQuery(@$"DEFINE TABLE {tableName} SCHEMAFULL;DEFINE FIELD name ON TABLE {tableName} TYPE string;");awaitdb.Create<Test>(tableName,newTest(){Name="Test normal data"});awaitdb.Create<Test>(tableName,newTest(){Name="Test normal data2"});awaitdb.Create<Test>(tableName,newTest(){Name="Test normal data3"});awaitdb.Create<Test>(tableName,newTest(){Name="example:string"});
Where it throws Error: SurrealDb.Net.Exceptions.SurrealDbException: There was a problem with the database: Found example:string for field `name`, with record `test:djqxpvplqi7eorq6pp9t`, but expected a string
As a workaround, I can set the type to be any, but that is no longer representative of the data I am putting in it.
The text was updated successfully, but these errors were encountered:
I have a scemafull with a field defined as
string
and if I set it to a string which is in the form of a record (e.g.test:string
) then it throws an exception. There is a workaround in surrealql, but I don't know how to do that in this SDK.Minimal replication example:
Where it throws
Error: SurrealDb.Net.Exceptions.SurrealDbException: There was a problem with the database: Found example:string for field `name`, with record `test:djqxpvplqi7eorq6pp9t`, but expected a string
As a workaround, I can set the type to be
any
, but that is no longer representative of the data I am putting in it.The text was updated successfully, but these errors were encountered: