Skip to content

Field not found with sugar mapping #21

@wolf4ood

Description

@wolf4ood

The mapping to structs should use optional when specified for optional fields.

Currently this emit an error

    #[derive(orientdb_client::derive::FromResult, Debug, PartialEq)]
        struct Person {
            name: String,
            age : Option<i32>
        }

        let result: Option<Person> = session
            .query("select from OUser where name = ?")
            .positional(&[&"admin"])
            .fetch_one()
            .unwrap();

but it should work since age is optional

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions