Skip to content

Commit 5edef7e

Browse files
Calculate Entity Persistent Property
1 parent cc39f82 commit 5edef7e

File tree

1 file changed

+2
-2
lines changed
  • HibernateSpringBootCalculatePropertyGenerated

1 file changed

+2
-2
lines changed

HibernateSpringBootCalculatePropertyGenerated/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Description:** This application is an example of calculating an entity persistent property at `INSERT` and/or `UPDATE ` time via Hibernate, `@Generated`.
44

5-
**Key points:**\
5+
**Key points:**
66

77
**Calculate at `INSERT` time:**
88
- annotate the corresponding persistent field with `@Generated(value = GenerationTime.INSERT)`
@@ -12,7 +12,7 @@
1212
- annotate the corresponding persistent field with `@Generated(value = GenerationTime.ALWAYS)`
1313
- annotate the corresponding persistent field with `@Column(insertable = false, updatable = false)`
1414

15-
**Further, apply:**\
15+
**Further, apply:**
1616

1717
**Method 1:**
1818
- if the database schema is generated via JPA annotations (not recommended) then use `columnDefinition` element of `@Column` to specify as an SQL query expression the formula for calculating the persistent property\

0 commit comments

Comments
 (0)