-
Notifications
You must be signed in to change notification settings - Fork 68
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
Entities shouldn't depend on database? #5
Comments
Thanks for raising this issue. Not entirely sure we're talking about the same here. Entities (business objects) like There's a similarity between Care to elaborate further on:
That's the bit I'm currently not following. |
Thank you for your answer Mark. It's clear now. I thought that Now it's clear that |
In general, there a few terms to describe the same thing and overlapping terms. Talking about an entity without further context lets one think about JPA entities. Entities within the hexagonal architecture are a different thing. I'm happy to improve. In general, one wants to have a properly named application model without prefixes/suffixes as that's where a fair amount of focus lies on. I used Do you have a suggestion how to improve naming? |
I like the class naming. I'm talking about renaming the java packages where the classes are located. |
Makes sense.
Moving all classes and interfaces to their parent package ( |
Your entities looks like database object, they have table names, database ids, etc. Aren't entities supposed to be most abstract type of data, not dependent in any way on your persistence solution?
http://cleancodejava.com/uncle-bob-payroll-case-study-full-implementation/
"Entities are not the same as JPA Entities, they are high level business rules, policies, and should be independent from any other concerns."
It looks like entities here are JPA Entities.
The text was updated successfully, but these errors were encountered: