Replies: 4 comments 2 replies
-
|
Hey @alper, it's just a placeholder when a entity doesn't have relation with other entities. |
Beta Was this translation helpful? Give feedback.
-
|
Umm the current type system requires a Relation associated type on Entity so we need these stub. We can either generate these inside a macro to hide it from plain sight, or rework the Entity type system. |
Beta Was this translation helpful? Give feedback.
-
|
Basically whether we should have Entity and EntityWithRelation |
Beta Was this translation helpful? Give feedback.
-
|
Actually, this works. #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}will be expanded into pub enum Relation {}
impl sea_orm::entity::RelationTrait for Relation {
fn def(&self) -> sea_orm::entity::RelationDef {
match self {
_ => panic!("No RelationDef for Relation")
}
}
}I will update the codegen and all related examples |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I still don't get it.
And why do I get this unused stuff in the generated file?
Beta Was this translation helpful? Give feedback.
All reactions