-
Planeetscale is built on top of Vitress and MySQL driver is used in communicating with the database. I have used the mysql cargo package to test the connection and it works properly but when using the sea-orm-cli to generate entity it's giving an error thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ColumnDecode
{ index: "0", source: "mismatched types; Rust type `alloc::string::String` (as SQL type `VARCHAR`)
is not compatible with SQL type `VARCHAR`" }',
/Users/UserName/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/sqlx-core-0.5.13/src/row.rs:73:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace How to fix this?? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hello, I also got the same error but I generate an entity by hand (similar to example) not by CLI. a connection to the The error that appeared
Entity Definition #[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "dev_Dummy")]
pub struct Model {
#[sea_orm(primary_key)]
// I also tried
// #[sea_orm(primary_key, column_type = "String(Some(21))")]
pub id: String,
} Thank you for your awesome library! . |
Beta Was this translation helpful? Give feedback.
-
Hey @snxk & @vokup, thanks for raising this up. I found related discussion below |
Beta Was this translation helpful? Give feedback.
-
However, since Planetscale is not an OSS project, it is unlikely we will support it officially without someone paying for it. |
Beta Was this translation helpful? Give feedback.
Hey @snxk & @vokup, thanks for raising this up. I found related discussion below