Skip to content
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

implement "has_one" and "has_many" through RelatedTable and RelatedReference, anticipating unrelated references to implemented later. Can finally downcast after traversal. #12

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

romaninsh
Copy link
Owner

@romaninsh romaninsh commented Sep 24, 2024

let product: Table<Postgres, Product> = bakery->get_ref_as("product").unwrap();

or as an entity method:

    fn ref_products(&self) -> Table<Postgres, Product> {
        self.as_table().get_ref_as("products").unwrap()
    }

amazing!

i'm not super happy with some clone() gymnastics due to downcast_ref, but i suppose that's fine for now.

…ference, anticipating unrelated references to implemented later. Can finally downcast after traversal.
@romaninsh romaninsh merged commit 98ebffb into main Sep 24, 2024
2 checks passed
@romaninsh romaninsh deleted the Virtual-branch branch September 24, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant