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

diesel_demo doesn't compile with 0.80 + Sqlite #484

Closed
ambaxter opened this Issue Oct 20, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@ambaxter

ambaxter commented Oct 20, 2016

When trying to follow the diesel_demo instructions with sqlite, I get the following error. Any ideas?

error[E0277]: the trait bound `i32: diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::Integer>, _>` is not satisfied
  --> src/bin/show_posts.rs:14:10
   |
14 |         .load::<Post>(&connection)
   |          ^^^^ trait `i32: diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::Integer>, _>` not satisfied
   |
   = help: the following implementations were found:
   = help:   <i32 as diesel::types::FromSqlRow<diesel::types::Integer, DB>>
   = note: required because of the requirements on the impl of `diesel::types::FromSqlRow<(diesel::types::Nullable<diesel::types::Integer>, diesel::types::Text, diesel::types::Text, diesel::types::Bool), _>` for `(i32, std::string::String, std::string::String, bool)`
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::types::Nullable<diesel::types::Integer>, diesel::types::Text, diesel::types::Text, diesel::types::Bool), _>` for `diesel_demo::models::Post`
@sgrif

This comment has been minimized.

Member

sgrif commented Oct 22, 2016

The examples assume the use of PostgreSQL. However that error looks like the schema is incorrect, where a field that should be NOT NULL is nullable.

@sgrif sgrif closed this Oct 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment