MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / partial_model_flat

Function partial_model_flat

tests/partial_model_tests.rs:200–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198
199#[sea_orm_macros::test]
200async fn partial_model_flat() {
201 let ctx = TestContext::new("partial_model_flat").await;
202 create_tables(&ctx.db).await.unwrap();
203
204 seed_data::init_1(&ctx, true).await;
205
206 let bakery: Bakery = bakery::Entity::find()
207 .into_partial_model()
208 .one(&ctx.db)
209 .await
210 .expect("succeeds to get the result")
211 .expect("exactly one model in DB");
212
213 assert_eq!(bakery.id, 42);
214 assert_eq!(bakery.title, "cool little bakery");
215
216 ctx.delete().await;
217}
218
219#[sea_orm_macros::test]
220async fn partial_model_nested() {

Callers

nothing calls this directly

Calls 7

init_1Function · 0.85
unwrapMethod · 0.80
newFunction · 0.50
create_tablesFunction · 0.50
oneMethod · 0.45
into_partial_modelMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected