8.12.13 @Entity
- Organization of this subsection
(1) Description
This annotation specifies that the class is an entity.
The class name of the entity class does not include the package name. Note the following points during specification:
-
Make sure that the entity name is a unique name within the persistence unit.
-
You cannot set up the reserved characters of JPQL. If you set up the reserved characters, the operation will not be guaranteed.
The applicable target is class.
(2) Element
The following table lists the elements of @Entity:
Element name |
Optional/Required |
Element description |
---|---|---|
Optional |
This element specifies a logical name for the entity class. It becomes an abstract schema name in JPQL. |
The details of attributes that are supported with Cosminexus JPA provider are as follows:
(a) name element
- Type
-
String
- Description
-
This element specifies a logical name for the entity class. It becomes an abstract schema name in JPQL.
The value that can be specified depends on the specifications of JPQL.
- Default value
-
Class name of the class in which @Entity is specified