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

Embedded Entities #286

Open
domvernon opened this issue Jan 1, 2020 · 2 comments
Open

Embedded Entities #286

domvernon opened this issue Jan 1, 2020 · 2 comments

Comments

@domvernon
Copy link

👋 Does Warthog support embedded entities? My usecase would be similar to the one given, to reduce boilerplate for several models that would have the same fields.

@goldcaddy77
Copy link
Owner

Hi, I don't support this yet. How would you imagine sorting and filtering would work on these columns? What might the Warthog API look like for this?

Note that you could always create a class and subclass from it, inheriting it's columns.

@domvernon
Copy link
Author

Not sure about the API, but since the underlying tables would have whatever columns the other entity defined I believe it would be similar. Inheritance would definitely be another way to achieve this - the other way lends itself more to composition patterns.

Thanks for the reply though, I'm enjoying using the framework so far!

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

No branches or pull requests

2 participants