-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Copy link
Labels
sdk-issueIssues with the Rust SDK specificallyIssues with the Rust SDK specificallytopic:rustThis is related to the Rust embedded libraryThis is related to the Rust embedded library
Description
Describe the bug
Using nested structs, where RecordId is anywhere except the top level, results in a serialization error: untagged or internally tagged enums do not support enum input
Steps to reproduce
Using the following structs, attempt to client.create::<Option<UserEntity>>("table")
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UserEntity {
#[serde(flatten)]
inner: User,
pub password_hash: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct User {
pub id: RecordId,
#[serde(flatten)]
inner: UserData,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UserData {
pub name: String,
}
Expected behaviour
No error, as it worked in 1.5.5
SurrealDB version
2.0.1 for linux on x86_64
Contact Details
No response
Is there an existing issue for this?
- I have searched the existing issues
Code of Conduct
- I agree to follow this project's Code of Conduct
raxosiris, frederik-uni, YaZasnyal, aykxt, d-sandman and 3 morerynoV, raxosiris, astral1, frederik-uni, aykxt and 3 more
Metadata
Metadata
Assignees
Labels
sdk-issueIssues with the Rust SDK specificallyIssues with the Rust SDK specificallytopic:rustThis is related to the Rust embedded libraryThis is related to the Rust embedded library