From 26e2a306f3f933e35d6d938e5844a1d9462c1c6b Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Aug 2024 20:56:12 +0800 Subject: [PATCH] codegen: fix `ColumnType::Bit` resolution --- sea-orm-codegen/src/entity/column.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sea-orm-codegen/src/entity/column.rs b/sea-orm-codegen/src/entity/column.rs index e126f7642..2afdab793 100644 --- a/sea-orm-codegen/src/entity/column.rs +++ b/sea-orm-codegen/src/entity/column.rs @@ -77,6 +77,8 @@ impl Column { ColumnType::Array(column_type) => { format!("Vec<{}>", write_rs_type(column_type, date_time_crate)) } + ColumnType::Bit(Some(1)) => "bool".to_owned(), + ColumnType::Bit(_) => "Vec".to_owned(), _ => unimplemented!(), } }