SeaORM Adapter
Use hydracache-seaorm when SeaORM remains the query authority and HydraCache should wrap only the query-result boundary.
let queries = SeaOrmCache::new(HydraCache::local().build(), "seaorm");
let user_name = queries
.entity::<String>("user", 42)
.collection_tag("users")
.sea_one(|| async {
// Replace this with a SeaORM query or repository method.
Ok::<_, hydracache_seaorm::sea_orm::DbErr>("Ada".to_owned())
})
.await?;
assert_eq!(user_name, "Ada");
Use fetch_with when a SeaORM query, transaction, or repository function does not fit the convenience helper shape.