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

"Expression not implemented for Uuid" in 1.2 #1628

Closed
jonathanstrong opened this Issue Apr 10, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@jonathanstrong

jonathanstrong commented Apr 10, 2018

Setup

Versions

  • Rust: 1.27.0-nightly
  • Diesel: 1.1.2
  • Database: Postgres
  • Operating System Ubuntu 16.04

Feature Flags

  • diesel: postgres, extras

Problem Description

On upgrading to v1.2, I'm getting an error I don't understand. This error is not present when trying to compile with v1.1. I have enabled the "uuid" feature (via "extras" feature):

error[E0277]: the trait bound `uuid::Uuid: diesel::Expression` is not satisfied
   --> src/lib.rs:207:14
    |
207 |     #[derive(Insertable, Debug)]
    |              ^^^^^^^^^^ the trait `diesel::Expression` is not implemented for `uuid::Uuid`
    |
    = note: required because of the requirements on the impl of `diesel::Expression` for `&uuid::Uuid`
    = note: required because of the requirements on the impl of `diesel::expression::AsExpression<diesel::sql_types::Uuid>` for `&uuid::Uuid`
@Eijebong

This comment has been minimized.

Member

Eijebong commented Apr 10, 2018

Check that you don't have multiple versions of uuid in your lockfile

@sgrif

This comment has been minimized.

Member

sgrif commented Apr 21, 2018

This is almost certainly due to the use of two versions of uuid. I'm going to close this, as it seems resolved. Feel free to comment here, open a new issue, or ask for help in gitter if you continue to have problems.

@sgrif sgrif closed this Apr 21, 2018

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