I'm using sea-orm-cli to generate my entities for this table: CREATE TABLE "DocumentData" ( "DocumentDataId" INTEGER NOT NULL, "DocumentId" TEXT NOT NULL, "Data" BLOB, PRIMARY KEY("DocumentDataId") ) and the generated entity looks like t...
I have a big database of which I only need a couple tables generated. This PR introduces thetablesoption to thesea-orm-cli generate entitycommand as follows: -t, --tables <TABLES> Generate entity file for specified tables only (comma seperated) This allows me to do the following: sea-or...
sea-orm-cli generate entity -o src/entities --with-serde serialize Creates the following file with Enums that does not contain the serde derives, where the errors propagates to the users model's kind column. //! SeaORM Entity. Generated by sea-orm-codegen 0.5.0 use sea_orm::entity:...
#MySQL (`--database-schema` option is ignored)cargo run -- generate entity -u mysql://sea:sea@localhost/bakery -o out#SQLite (`--database-schema` option is ignored)cargo run -- generate entity -u sqlite://bakery.db -o out#PostgreSQLcargo run -- generate entity -u postgres://sea:...
Even with verbose mode i'm not sure why this sea-orm-cli generate entity fails: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ColumnDecode { index: "2", source: UnexpectedNullError }', /home/bastian/.cargo/regis...
Correct, but the point is codegen with expanded flag will generate the following... #[derive(Copy, Clone, Debug, EnumIter)] pub enum Relation {} impl RelationTrait for Relation { fn def(&self) -> RelationDef { match self { _ => panic!("No RelationDef"), } } } I will fix it!
It doesn't seem to be possible to configure aliases in the toml file, but you can configure multiple bins like this, which will generate two main target files: [[bin]] name = "sea-orm-cli" path = "src/main.rs" [[bin]] name = "sea" path = "src/main.rs" it's ok?Member...
# MySQL (`--database-schema` option is ignored) cargo run -- generate entity -u mysql://sea:sea@localhost/bakery -o out # SQLite (`--database-schema` option is ignored) cargo run -- generate entity -u sqlite://bakery.db -o out # PostgreSQL cargo run -- generate entity -u ...
# MySQL (`--database-schema` option is ignored) cargo run -- generate entity -u mysql://sea:sea@localhost/bakery -o out # SQLite (`--database-schema` option is ignored) cargo run -- generate entity -u sqlite://bakery.db -o out # PostgreSQL cargo run -- generate entity -u ...
# MySQL (`--database-schema` option is ignored) cargo run -- generate entity -u mysql://sea:sea@localhost/bakery -o out # SQLite (`--database-schema` option is ignored) cargo run -- generate entity -u sqlite://bakery.db -o out # PostgreSQL cargo run -- generate entity -u ...