Replies: 1 comment
-
Add #[serde(skip)] can save the work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an existing data model written in rust, it has the id field as the primary key of type
i64
as such:I find it's impossible to make it directly into the surrealdb using rust SDK without modifying the model file.
If I insert a model instance directly to the table using
.create(TABLE_NAME).content(model)
, it will be automatically changed intoTABLE_NAME:id
as String instead of numerici64
If I specify the id field like
.create((TABLE_NAME, id)).content(model).
, it will show an error indicating that id is already specified and the operation will fail.Beta Was this translation helpful? Give feedback.
All reactions