diff --git a/entity/src/candidate.rs b/entity/src/candidate.rs index fdfbc46..8a1e76e 100644 --- a/entity/src/candidate.rs +++ b/entity/src/candidate.rs @@ -30,16 +30,10 @@ pub struct Model { #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { - #[sea_orm(has_many = "super::session::Entity")] - Session, #[sea_orm(has_many = "super::parent::Entity")] Parent, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::Session.def() - } + #[sea_orm(has_many = "super::session::Entity")] + Session, } impl Related for Entity { @@ -48,4 +42,10 @@ impl Related for Entity { } } +impl Related for Entity { + fn to() -> RelationDef { + Relation::Session.def() + } +} + impl ActiveModelBehavior for ActiveModel {}