+
Skip to content

1.1.13

Latest
Compare
Choose a tag to compare
@tyt2y3 tyt2y3 released this 29 Jun 17:37
· 5 commits to 1.1.x since this release

New Features

  • [sea-orm-cli] New --frontend-format flag to generate entities in pure Rust #2631
// for example, below is the normal (compact) Entity:
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[sea_orm(table_name = "cake")]
pub struct Model {
    #[sea_orm(primary_key)]
    #[serde(skip_deserializing)]
    pub id: i32,
    #[sea_orm(column_type = "Text", nullable)]
    pub name: Option<String> ,
}
// this is the generated frontend model, there is no SeaORM dependency:
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Model {
    #[serde(skip_deserializing)]
    pub id: i32,
    pub name: Option<String> ,
}

Enhancements

  • Remove potential panics in Loader #2637
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载