Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field not found with sugar mapping #21

Open
wolf4ood opened this issue Jun 22, 2020 · 0 comments
Open

Field not found with sugar mapping #21

wolf4ood opened this issue Jun 22, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@wolf4ood
Copy link
Owner

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

@wolf4ood wolf4ood self-assigned this Jun 22, 2020
@wolf4ood wolf4ood added the bug Something isn't working label Jun 22, 2020
@wolf4ood wolf4ood added this to the 0.5.1 milestone Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant