• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[JPA] field or property annotation style..

 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In jpa, you have the option to annotate the entity field, property or both (however either or is recommended).

What is everyone doing and why?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The option is on the property or on the method. Either is fine. However, I would use the method version when you need to add code. Otherwise I stick with on the property.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic