Google News
logo
JPA - Interview Questions
What are the properties of an entity?
Persistability : An object is called persistent if it is stored in the database and can be accessed anytime.

Persistent Identity : In Java, each entity is unique and represents an object identity. Similarly, when the object identity is stored in a database, then it is represented as persistence identity. This object identity is equivalent to the primary key in the database.

Transactionality : A transaction is a set of operations that either fail or succeed as a unit. Transactions are a fundamental part of persistence.

Granularity : Entities should not be primitives, primitive wrappers or built-in objects with single dimensional state.
Advertisement