Skip to content

Commit 85a3227

Browse files
Calculate entity property at INSERT or UPDATE time
1 parent dade2dd commit 85a3227

File tree

1 file changed

+1
-1
lines changed
  • HibernateSpringBootCalculatePropertyGenerated

1 file changed

+1
-1
lines changed

HibernateSpringBootCalculatePropertyGenerated/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
- annotate the entity property that should be calculated with `@Generated(value = GenerationTime.ALWAYS)` or `@Generated(value = GenerationTime.INSERT)`\
77
- if the database schema is generated via JPA annotations then use `columnDefinition` element of `@Column`
88

9-
**Note:** In production, you should not rely on this practice. You should set `hibernate.ddl-auto` to `none` or `validate`, and add the SQL query expression in `CREATE TABLE` (in this example, check `schema-sql.sql`). Nevertheless, not even `schema-sql.sql` is ok in production. The best way is to rely on Flyway or Liquibase).
9+
**Note:** In production, you should not rely on this practice. You should set `hibernate.ddl-auto` to `none` or `validate`, and add the SQL query expression in `CREATE TABLE` (in this example, check `schema-sql.sql`). Nevertheless, not even `schema-sql.sql` is ok in production. The best way is to rely on Flyway or Liquibase.
1010

1111
<a href="https://leanpub.com/java-persistence-performance-illustrated-guide"><p align="center"><img src="https://github.com/AnghelLeonard/Hibernate-SpringBoot/blob/master/Java%20Persistence%20Performance%20Illustrated%20Guide.jpg" height="410" width="350"/></p></a>

0 commit comments

Comments
 (0)