Skip to content

Commit

Permalink
IDENTITY support type added to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
delchev committed Nov 27, 2017
1 parent f663f5e commit a0fda30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/database-persistence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ It uses some of the standard JPA annotations, but it is different in some aspect

#### POJO Order with a generated field **id**

Default strategy is **TABLE**. In case of **SEQUENCE** you can use ```@GeneratedValue(strategy = GenerationType.SEQUENCE)```. **AUTO** is considered **TABLE**, while **IDENTITY** is not supported.
Default strategy is **TABLE**. In case of **SEQUENCE** you can use ```@GeneratedValue(strategy = GenerationType.SEQUENCE)``` and in case of **IDENTITY** - ```@GeneratedValue(strategy = GenerationType.IDENTITY)```. **AUTO** is considered **TABLE**.

While the default strategy is the **TABLE** for better compatibility with the different databases, it is highly recommended to use **SEQUENCE**, if possible.
While the default strategy is the **TABLE** for better compatibility with the different databases, it is highly recommended to use **SEQUENCE** or **IDENTITY**, if possible. Use **IDENTITY** only with **Id** (Primary Key).

```java

Expand Down

0 comments on commit a0fda30

Please sign in to comment.