-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Use case
After #221 and #244, we still can't support flattened structs such as:
#[derive(Row, Serialize)]
struct Metadata {
foo: String,
bar: String,
}
#[derive(Row, Serialize)]
struct MyRow {
#[serde(flatten)]
metadata: Metadata,
data: String,
}
while inserting data to a table like this:
CREATE TABLE test (
foo String,
bar String,
data String
)
Currently, with enabled validation, it will complain about number of fields (2 in struct vs 3 in the db), cause currently it will derive only [ "metadata", "data" ]
, and not [ "foo", "bar", "data" ]
as it should have been.
Describe the solution you'd like
To solve this, derive macro needs adjustments to support recursive resolution.
Additional context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request