How do we structure the database abstractions? #163
bbjubjub2494
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The code review raised some issues regarding the API of
DatabaseService. If we refactor that, how should we proceed?In my opinion they made some sensible suggestions, such as using the Repository pattern with POKOs. (POKOs in particular didn't make sense to me in the beginning, but in retrospect I cant unsee that most
DatabaseServiceare doing two different things instead of one) I think we should do that.I also think we could take the opportunity to offer primary keys rather than full entities when relational fields are loaded. (e.g.
Set<Category.Id>instead ofSet<Category>) It would be beneficial to keep some type safety on that, which I think we can accomplish with some combination of phantom type parameters and inline classesIt might be useful to turn
DatabaseServiceinto an adapter calling into the new repository objects during the transition period.Beta Was this translation helpful? Give feedback.
All reactions