-
-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Represent several relations between same types #89
Comments
Goods news is, we had thought about how to define advanced relations with more than two level joins, and it would be another triat concept. Perhaps something like: trait Linked {
type FromEntity: EntityTrait;
type ToEntity: EntityTrait;
fn link(&self) -> Vec<RelationDef>;
} such that multiple |
Some clarifications: Related is for inherit relations, like order with order item and product with product attribute, basically an edge on the ER diagram. While Linked is the connection between any two Entity on the ERD, which can jump through multiple hops, and have multiple valid routes. |
We target to introduce new APIs in 0.2.0 |
Example problematic cases:
COUPLE.member1 -> USER
andCOUPLE.member2 -> USER
)In these cases there are several issues:
Relation
variants, so we obtain duplicate variants. I guess it could use the join table or foreign key entity nameRelated
trait is typed on A/B entities, so same issue. So I believe fixing this requires a breaking conception change...The text was updated successfully, but these errors were encountered: