timyas / java-muster

Java model project
0 stars 0 forks source link

Problems in java models #6

Open peterarsentev opened 8 years ago

peterarsentev commented 8 years ago

You have some commons problems in you Java models.

  1. When you create the new models, you should override the equals and hashCode methods everytimes. You did not.
  2. So far as, we use Hibernate ORM, you should build models with compositions. For example. Issue model takes User models directly, You don't need to use authorId. Another example. Issue should takes the list of comments. Therefore, you need to create the new fields, private List comments.
  3. Models should operate particular data type, For example, Calendar createDate, You use String. It does not good.