Diesel: "Expression not implemented for Uuid" in 1.2

Created on 10 Apr 2018  路  2Comments  路  Source: diesel-rs/diesel

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`

Most helpful comment

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.

All 2 comments

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

killercup picture killercup  路  4Comments

kanekv picture kanekv  路  3Comments

jimmycuadra picture jimmycuadra  路  4Comments

gutsle picture gutsle  路  4Comments