Skip to content

Commit

Permalink
fix #21
Browse files Browse the repository at this point in the history
  • Loading branch information
jifalops committed Mar 21, 2024
1 parent 63780cb commit c72ce72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions example/src/person.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub struct Person {
age: Option<u8>,
/// Favorite colors
colors: Vec<String>,
photo_url: Option<String>,
}

#[derive(Relation)]
Expand Down Expand Up @@ -46,6 +47,7 @@ mod tests {
"name",
Some(42),
&["red".to_owned(), "blue".to_owned()],
None,
);
assert_eq!(p.id(), "id");
let p = p.into_builder().name("name2").build();
Expand Down
2 changes: 1 addition & 1 deletion macros/src/derive/entity/field/map_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub fn field_from_boltmap(name: &str, typ: &FieldType) -> TokenStream {
}
FieldType::OptionOther(_ty) => {
quote!(
value.get(#name)
value.get(#name).map_err(|e| ::cypher_dto::Error::MissingField(#name.to_owned()))?
)
}
FieldType::Other(_ty) => {
Expand Down

0 comments on commit c72ce72

Please sign in to comment.