You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a class is annotated with JPA's @Entity, there are certain requirements placed on the class. Please create a rule that requires the class to be non-final.
Note: Hibernate allows for final classes but lazy-loading will not work.
Code Sample:
The following class will cause a problem at runtime because it is final.
@Entity
final class MyEntity
{
...
}
The following class is correct.
@Entity
class MyEntity
{
...
}
Possible Properties:
allowPackage: Hibernate allows for package protected no-argument constructors
The text was updated successfully, but these errors were encountered:
Proposed Rule Name: JPANonFinalClass
Proposed Category: Bug
Description:
When a class is annotated with JPA's
@Entity
, there are certain requirements placed on the class. Please create a rule that requires the class to be non-final
.Note: Hibernate allows for
final
classes but lazy-loading will not work.Code Sample:
The following class will cause a problem at runtime because it is final.
The following class is correct.
Possible Properties:
The text was updated successfully, but these errors were encountered: