Inspectopedia Help

JPA

Entity listener problems  

Reports the following JPA specification errors:.

Entity listener warnings  

Reports entity listener classes without any entity listener methods.

Orm.xml problems  

Reports unresolved references to any database objects inside `orm.xml` configuration files:.

Persistence.xml is not added to facet  

Reports missing persistence.xml configuration files and suggests adding the file to the persistence facet.

Persistent attribute signature checks  

Reports the following JPA specification errors:.

Persistent attribute type checks  

Reports property type mismatch for JPA attributes.

Persistent entity misses primary key  

Reports missing identification property persistence objects.

Persistent object class signature checks  

Reports incorrectly defined persistent object classes in the following cases:.

Query language checks  

Reports the following errors inside Persistence QL queries: Mismatching expression types Incorrect parameters Empty or constant conditions Unresolved symbols Example queries: SELECT OBJECT(e) FROM JavaEntity e WHERE TRUE // Warning: constant condition SELECT OBJECT(e) FROM JavaEntity e WHERE e.id BETWEEN 0 AND '2' // Error: expected a numeric value but got a string SELECT e from JavaEntity e where e.id=?1 and e.name=?3 // Error: there are only 2 actual query parameters.

Unresolved database references in XML  

Reports Persistence ORM XML descriptors that cannot be resolved within the configured datasource and suggests refreshing the datasource or assigning a different one.

Unresolved database references in annotations  

Reports references inside the following Persistence ORM annotations if they cannot be resolved within the configured datasource:.

Unresolved entity graph names  

Reports the following unresolved attributes inside EntityGraph-related annotations:.

Unresolved queries and query parameters  

Reports unresolved symbols in named and native queries and related API methods: Unknown named query Unknown query parameter Example: @Entity @NamedQuery(name = "SelectByConditionQuery", query = "...") public class JavaEntity { ..

Unresolved references in queries  

Reports unresolved symbols in the following JPA annotations and API methods:.

persistence.xml problems  

Reports the following problems inside XML configuration files:.

Last modified: 18 June 2024