{"full_name":"SeaQL/sea-orm","owner":"SeaQL","name":"sea-orm","shard":"1","url":"https://github.com/SeaQL/sea-orm","description":"🐚 A powerful relational ORM for Rust","homepage":"https://www.sea-ql.org/SeaORM/","topics":["mysql","rust","sqlite","orm","postgres","tokio","database","sql","sqlx","mariadb","loco","hacktoberfest"],"tag_pages":["database","hacktoberfest","mariadb","mysql","orm","postgres","rust","sql","sqlite"],"language":"Rust","license":"Apache-2.0","avatar":"https://avatars.githubusercontent.com/u/73226408?v=4","created_at":"2021-02-09T07:16:15Z","pushed_at":"2026-11-10T13:24:31Z","metrics":{"stars":9970,"forks":749,"watchers":38,"issues":1094,"prs":1206,"releases":106,"issues_open":159,"issues_closed":935,"prs_open":67,"prs_closed":201,"prs_merged":938,"discussions":855},"growth":{"day":{"stars":2,"forks":0,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[9954,9959,9961,9961,9964,9968,9970],"forks":[748,749,749,749,749,749,749],"watchers":[null,38,38,38,38,38,38],"issues_open":[null,156,156,156,156,156,159],"prs_open":[null,68,68,67,67,67,67]},"boards":{},"same_owner":[],"issues":[{"number":220,"title":"[Feature Request] Soft Delete","comments":18,"created_at":"2021-10-03T07:15:53Z"},{"number":924,"title":"Uuid/Datetime/etc. types (instead of String) for generated models with sqlite databases","comments":14,"created_at":"2022-07-29T20:01:21Z"},{"number":1123,"title":"[PIP] Event stream","comments":12,"created_at":"2022-10-16T16:07:32Z"},{"number":2423,"title":"Returning model with `enum` field with `find_by_statement`","comments":10,"created_at":"2024-11-20T12:18:24Z"},{"number":591,"title":"[ADD]: Pre-commit hook to keep the project clean","comments":10,"created_at":"2022-03-10T09:10:49Z"},{"number":3183,"title":"Nested ActiveModelEx::save() fails to insert a new has_many child with a composite, non-auto-increment primary key","comments":9,"created_at":"2026-08-22T18:13:50Z"},{"number":3034,"title":"Postgres tsvector/tsquery support","comments":9,"created_at":"2026-04-02T18:27:52Z"},{"number":2749,"title":"Feature Request: Support for async closures","comments":9,"created_at":"2025-10-12T20:39:29Z"}],"discussions":[{"number":3262,"title":"camelCase for custom query and mutation names","comments":1,"category":"Q&A","created_at":"2026-11-11T08:57:38Z"},{"number":3260,"title":"Specify rs_type on generated enum","comments":1,"category":"Q&A","created_at":"2026-11-10T15:49:51Z"},{"number":3239,"title":"How to mock Entity Loader-type queries? (Or, examples on how to mock complex relationships?)","comments":2,"category":"Q&A","created_at":"2026-10-23T14:51:54Z"},{"number":3230,"title":"From `DeriveIntoActiveModel` to a Rust MapStruct: should SeaORM add `DeriveIntoVo` or incubate a dedicated mapper?","comments":2,"category":"Ideas","created_at":"2026-10-10T10:12:57Z"},{"number":3223,"title":"Invite more contributors and maintainers to help SesQL grow","comments":1,"category":"Ideas","created_at":"2026-10-05T02:45:55Z"},{"number":3190,"title":"manage migration files in entity firs aproach, verify them, apply them either using seaorm migration files or flyway","comments":1,"category":"Q&A","created_at":"2026-09-01T15:32:33Z"},{"number":3181,"title":"Updating ActiveModel with deeply nested ActiveModel structure after the fact","comments":2,"category":"Q&A","created_at":"2026-08-21T11:16:07Z"},{"number":3170,"title":"Why is `Eq` skipped in `ModelEx`?","comments":1,"category":"Q&A","created_at":"2026-08-13T08:43:59Z"}],"latest_release":{"name":"2.0.4","tag":"2.0.4","published_at":"2026-09-27T16:39:15Z","body":"# SeaORM 2.0.4\n\n*(since 2.0.3)*\n\n## Enhancements\n\n* Add `select_except` to select all columns except the given ones https://github.com/SeaQL/sea-orm/pull/3211\n\n  `select_except` provides the inverse of `select_only` / `column`——selecting all columns except the specified ones.\n\n  These methods replace the current selection, so the last one called takes effect.\n\n  ```rust\n  #[derive(DerivePartialModel)]\n  #[sea_orm(entity = \"post::Entity\")]\n  struct PostPreview {\n      id: i32,\n      title: String,\n  }\n\n  let posts = post::Entity::find()\n      .select_except([post::Column::Body])\n      .into_model::<PostPreview>()\n      .all(db)\n      .await?;\n  ```\n\n## Bug Fixes\n\n* Fix chained `left_join_linked` using the wrong alias for links with multiple relations https://github.com/SeaQL/sea-orm/pull/3199\n\n  When `left_join_linked` was called more than once, later joins in a multi-relation link could refer to aliases belonging to the first call. The query remained valid but could return incorrect rows.\n\n  ```rust\n  cake::Entity::find()\n      .left_join_linked(CakeToFilling)\n      .left_join_linked(CakeToFillingVendor)\n  ```\n\n  ```sql\n  -- before\n  LEFT JOIN `filling` AS `r3` ON `r0`.`filling_id` = `r3`.`id`\n\n  -- after\n  LEFT JOIN `filling` AS `r3` ON `r2`.`filling_id` = `r3`.`id`\n  ```\n\n* Respect `condition_type` in linked joins https://github.com/SeaQL/sea-orm/pull/3203\n\n  `left_join_linked` and `find_linked` always combined the relation condition and `on_condition` with `AND`, even when `ConditionType::Any` was specified.\n\n  They now follow `condition_type`, matching regular `join()`.\n\n  ```rust\n  cake::Relation::Fruit\n      .def()\n      .condition_type(ConditionType::Any)\n      .on_condition(|_left, right| {\n          Expr::col((right, fruit::Column::Name))\n              .like(\"%tropical%\")\n              .into_condition()\n      })\n  ```\n\n  ```sql\n  -- before\n  LEFT JOIN `fruit` AS `r0` ON `cake`.`id` = `r0`.`cake_id` AND `r0`.`name` LIKE '%tropical%'\n\n  -- after\n  LEFT JOIN `fruit` AS `r0` ON `cake`.`id` = `r0`.`cake_id` OR `r0`.`name` LIKE '%tropical%'\n  ```\n\n* Fix `save_as` not being applied to array values in `eq_any` / `ne_all` https://github.com/SeaQL/sea-orm/pull/3208\n\n  ```rust\n  #[sea_orm(column_type = r#\"custom(\"citext\")\"#, save_as = \"citext\")]\n  pub email: String,\n\n  Entity::find().filter(Column::Email.eq_any([\"a@x.com\".to_owned(), \"B@x.com\".to_owned()]))\n  ```\n\n  ```sql\n  -- before: text[], case-sensitive\n  WHERE \"user\".\"email\" = ANY(ARRAY ['a@x.com','B@x.com'])\n\n  -- after\n  WHERE \"user\".\"email\" = ANY(CAST(ARRAY ['a@x.com','B@x.com'] AS citext[]))\n  ```\n\n* Fix schema sync failing to drop a stale unique index on MySQL https://github.com/SeaQL/sea-orm/pull/3202\n\n  Removing `#[sea_orm(unique)]` from a column could make the next schema sync fail with MySQL error 1064.\n\n## Upgrades\n\n* Upgrade `arrow` to 60 (`sea-orm-arrow` 2.0.0-rc.5)\n\n  `with-arrow` now builds against arrow 60. Arrow types passed to SeaORM, such as a `RecordBatch` for `from_arrow`, must come from arrow 60 too, so crates like `parquet` need the matching version.\n\n  ```toml\n  arrow = \"60\"\n  parquet = \"60\"\n  ```\n","is_prerelease":false},"readme":true,"readme_zh":true,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}