CAST Engineering Dashboard - Violations - No violation - hibernate quality rules
Purpose
This page gives information about the cases in which the rule is not supposed to violate the hibernate quality rules.
Some examples of hibernate rules are -
- Use only Hibernate API to access to the database
- Avoid UPDATE trigger firing when not necessary
- Never use array to map a collection
Applicable in CAST Version
| Release | Yes/No |
|---|---|
| 8.3.x | ✅ |
Applicable RDBMS
| RDBMS | Yes/No |
|---|---|
| CSS | ✅ |
Action Plan
For the hibernate quality rules to be violated ensure the following is present.
Analysis unit has the same hibernate version set as the one used in the the application source code
There are objects making links with hibernate framework classes.
In Cast-MS if you select “Hibernate/JPA” it will just activate some features of the JEE analyzer. But it doesn’t mean any objects/links related to hibernate will be created.
If any object belonging to a module is making links with any of the children of below classes then it means it has hibernate objects/links. Hence the module which the object belongs to is considered as a hibernate module.
’net.sf.hibernate.Query’, ‘org.hibernate.Query’, ‘javax.persistence.Query’, ’net.sf.hibernate.Session’, ‘org.hibernate.Session’, ‘javax.persistence.EntityManager’
With the help of enlighten take any example hibernate framework class(es)
For instance in the below screenshot we have taken example classes org.hibernate.Query and javax.persistence.Query. And when we performed add linked objects then we found some objects making links to the standard hibernate framework classes. This means that the rule is supposed to be checked for the modules to which these objects belong to. But if there are no links then the rule will not be checked for the particular module but will be checked for other modules which have hibernate links.
Figure 1
**Notes/comments**
Ticket # 9466
**Related Pages**