You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let user = sqlx::query_as!(User,"select * from users where email = $1",self.email).fetch_one(pool).await.ok()?;
Produces this error:
error[E0560]: struct `User` has no field named `user_id`
--> src/lib.rs:36:20
|
36 | let user = sqlx::query_as!(User, "select * from users where email = $1", self.email)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `User` does not have this field
|
= note: available fields are: `id`, `email`, `password`
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info)
While the struct has the appropriate rename macro:
The following piece of code:
Produces this error:
While the struct has the appropriate rename macro:
I am using the correct uuid type:
use sqlx::{types::Uuid, PgPool};
The text was updated successfully, but these errors were encountered: