Tag: entities
-
Is there anyway to store related 1-m entities in sea orm for quering with graphql?
0 so, for example i have user entity which has related adverts (one user -> many adverts) use async_graphql::{self, SimpleObject}; use chrono::NaiveDateTime; use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, SimpleObject)] #[sea_orm(table_name = "user")] #[graphql(name = "User")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, pub name: String, pub surname: String,…