We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
table clolumns with big_unsigned type get mapped to an i64 field during entity generation by seaorm-cli
#[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .create_table( Table::create() .table(User::Table) .if_not_exists() .col(pk_auto(User::Id)) .col(big_unsigned(User::DiscordId)) .to_owned(), ) .await } async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .drop_table(Table::drop().table(User::Table).to_owned()) .await } } #[derive(DeriveIden)] enum User { Table, Id, DiscordId, }
sea-orm-cli generate entity -o entity/src -l
generated user.rs:
user.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.4 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] #[sea_orm(table_name = "user")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, pub discord_id: i64, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation {} impl ActiveModelBehavior for ActiveModel {}
pub discord_id: u64 in generated entity
pub discord_id: u64
pub discord_id: i64 in generated entity
pub discord_id: i64
every time
see above
1.1.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
table clolumns with big_unsigned type get mapped to an i64 field during entity generation by seaorm-cli
Steps to Reproduce
sea-orm-cli generate entity -o entity/src -l
generated
user.rs
:Expected Behavior
pub discord_id: u64
in generated entityActual Behavior
pub discord_id: i64
in generated entityReproduces How Often
every time
Workarounds
Reproducible Example
see above
Versions
1.1.4
The text was updated successfully, but these errors were encountered: