()
| 218 | |
| 219 | #[sea_orm_macros::test] |
| 220 | async fn partial_model_nested() { |
| 221 | // SELECT "bakery"."id" AS "basics_id", "bakery"."name" AS "basics_title", "bakery"."profit_margin" AS "profit" FROM "bakery" LIMIT 1 |
| 222 | let ctx = TestContext::new("partial_model_nested").await; |
| 223 | create_tables(&ctx.db).await.unwrap(); |
| 224 | |
| 225 | seed_data::init_1(&ctx, true).await; |
| 226 | |
| 227 | let bakery: BakeryDetails = bakery::Entity::find() |
| 228 | .into_partial_model() |
| 229 | .one(&ctx.db) |
| 230 | .await |
| 231 | .expect("succeeds to get the result") |
| 232 | .expect("exactly one model in DB"); |
| 233 | |
| 234 | assert_eq!(bakery.basics.id, 42); |
| 235 | assert_eq!(bakery.basics.title, "cool little bakery"); |
| 236 | assert_eq!(bakery.profit, 4.1); |
| 237 | |
| 238 | ctx.delete().await; |
| 239 | } |
| 240 | |
| 241 | #[sea_orm_macros::test] |
| 242 | async fn partial_model_join_three() { |
nothing calls this directly
no test coverage detected