Quantcast
Channel: Rust Diesel not building with error use of undeclared crate or module - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Ibraheem Ahmed for Rust Diesel not building with error use of undeclared crate or module

$
0
0

Diesel assumes that your table name is the plural, snake-case form of your struct name. Because your table name does not follow this convention you can specify the table name explicitly:

#[derive(Queryable, Identifiable)]#[table_name = "category"]pub struct Category {    // ...}#[derive(Queryable, Identifiable)]#[table_name = "correspondent"]pub struct Correspondent {    // ...}// and do the same to the rest of your models...

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>