Do you know the PMD or Checkstyle rules that will apply advanced hibernation techniques?

For example, do not build queries using string manipulation, etc.

+6
java hibernate checkstyle pmd
source share
3 answers

Looks like there are no such files ...

0
source share

When you review Hibernate best practices (or those best practices ), you notice that they are related to Hibernate configuration (xml files) or queries.

This means that it is best to write custom Chectyle checks .
(hence the status of the Wiki community, as this is not a direct answer)

0
source share

I don’t know of any such checks, but if you want to go this way, you either have the option presented above by VonC, or you can go a different way and look at AspectJ to report an error and / or to declare a warning.The main difference is that with AspectJ you can enforce these rules when compiling. In any case, if you are more familiar with PMD, it might be better to stay on this earth.

./Alex

0
source share

All Articles