# Arcane 'the trait bound is not satisfied' error while using Diesel

## SYMPTOMS

Given the following db model:

```rust
#[derive(Queryable, Debug, Identifiable, Clone)]
#[primary_key(doc_id)]
#[table_name = "biz"]
pub struct Biz {
    pub doc_id: u32,
    pub media_id: u32,
    pub num: u32,
    pub subnum: u32,
    pub thread_num: u32,
    pub op: bool,
    pub timestamp: u32,
    pub timestamp_expired: u32,
    pub preview_orig: Option<String>,
    pub preview_w: u16,
    pub preview_h: u16,
    pub media_filename: Option<String>,
    pub media_w: u16,
    pub media_h: u16,
pub media_size: u32,
    pub media_hash: Option<String>,
    pub media_orig: Option<String>,
    pub spoiler: bool,
    pub deleted: bool,
    pub capcode: String,
    pub email: Option<String>,
    pub name: Option<String>,
    pub trip: Option<String>,
    pub title: Option<String>,
    pub comment: Option<String>,
    pub delpass: Option<String>,
    pub sticky: bool,
    pub locked: bool,
    pub poster_hash: Option<String>,
    pub poster_country: Option<String>,
    pub exif: Option<String>,
    // pub unix_timestamp: NaiveDateTime,
}
```

And the `table!` macro with:

```rust
table! {
    biz (doc_id) {
        doc_id -> Unsigned<Integer>,
        media_id -> Unsigned<Integer>,
        num -> Unsigned<Integer>, // <-- accidentaly removed subnum here
        thread_num -> Unsigned<Integer>,
        op -> Bool,
        timestamp -> Unsigned<Integer>,
        timestamp_expired -> Unsigned<Integer>,
        preview_orig -> Nullable<Varchar>,
        preview_w -> Unsigned<Smallint>,
        preview_h -> Unsigned<Smallint>,
        media_filename -> Nullable<Text>,
        media_w -> Unsigned<Smallint>,
        media_h -> Unsigned<Smallint>,
        media_size -> Unsigned<Integer>,
        media_hash -> Nullable<Varchar>,
        media_orig -> Nullable<Varchar>,
        spoiler -> Bool,
        deleted -> Bool,
        capcode -> Varchar,
        email -> Nullable<Varchar>,
        name -> Nullable<Varchar>,
        trip -> Nullable<Varchar>,
        title -> Nullable<Varchar>,
        comment -> Nullable<Text>,
        delpass -> Nullable<Tinytext>,
        sticky -> Bool,
        locked -> Bool,
        poster_hash -> Nullable<Varchar>,
        poster_country -> Nullable<Varchar>,
        exif -> Nullable<Text>,
        // unix_timestamp -> Datetime,
    }
}
```

This error happens:

```text
Checking hesoyam v0.2.0 (/home/jakub/dev/hesoyam-suite/backend)
error[E0277]: the trait bound `(u32, u32, u32, u32, u32, bool, u32, u32, std::option::Option<std::string::String>, u16, u16, std::option::Option<std::string::String>, u16, u16, u32, std::option::Option<std::string::String>, std::option::Option<std::string::String>, bool, bool, std::string::String, std::option::Option<std::string::String>, std::option::Option<std::string::String>, std::option::Option<std::string::String>, std::option::Option<std::string::String>, std::option::Option<std::string::String>, std::option::Option<std::string::String>, bool, bool, std::option::Option<std::string::String>, std::option::Option<std::string::String>, std::option::Option<std::string::String>): Queryable<...>` is not satisfied
    --> src/models/biz.rs:62:14
     |
62   |             .load::<Biz>(connection)
     |              ^^^^ the trait `Queryable<...>` is not implemented for `(...)`
     |
     = help: the following implementations were found:
               <(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE) as Queryable<(SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SP, SQ, SR, SS, ST, SU, SV, SW, SX, SY, SZ, SAA, SAB, SAC, SAD, SAE), __DB>>
```

## FIX

This was caused by the mismatch of props in `table!` and in `Biz` model.

I've removed the `poster_ip` property from the macro (The type was `Unsigned<Decimal>` and I couldn't map it some available rust type).

Accidentally, I also removed the `subnum` property from `table!` macro, which caused the error.

> **TAKEAWAY:** So if this error happens, check if the props in `table!` and in model are matching.