Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtbuilds committed Jan 12, 2025
1 parent c5b9b49 commit 78028f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions macro/src/codegen/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub fn impl_Model__insert(db: &dyn OrmliteCodegen, attr: &ModelMeta, metadata_ca
#(
#query_bindings
)*
let mut model = q.fetch_one(&mut *conn).await?;
let mut model: Self = q.fetch_one(&mut *conn).await?;
#(
#late_bind
)*
Expand Down Expand Up @@ -95,7 +95,7 @@ pub fn impl_ModelBuilder__insert(db: &dyn OrmliteCodegen, attr: &TableMeta) -> T
);
let mut q = ::ormlite::query_as::<#db, Self::Model>(&query);
#(#bind_parameters)*
let mut model = q.fetch_one(db).await?;
let model = q.fetch_one(db).await?;
Ok(model)
})
}
Expand Down Expand Up @@ -162,9 +162,9 @@ pub fn impl_Insert(db: &dyn OrmliteCodegen, meta: &TableMeta, model: &Ident, ret
let mut model = self;
#(#insert_join)*
#(#query_bindings)*
let mut model = q.fetch_one(&mut *conn).await?;
let mut model: #returns = q.fetch_one(&mut *conn).await?;
#(#late_bind)*
Ok(model)
::ormlite::Result::<Self::Model>::Ok(model)
})
}
}
Expand Down

0 comments on commit 78028f2

Please sign in to comment.