This repository is part of my upcoming youtube series Persistence Operations
.
This demo project is supposed to give the trainee a brief idea of the concepts.
- Spring Boot and Java 14
- H2 in memory
Implement demo about:
- https://docs.jboss.org/hibernate/core/3.3/reference/en/html/objectstate.html#objectstate-modifying
- https://stackoverflow.com/questions/2573739/what-are-detached-persistent-and-transient-objects-in-hibernate
- Maybe: DUAL Demo
- Queries: https://www.baeldung.com/spring-data-jpa-query
- optimistic (with
@Version
) vs. pessimistic locking, see https://www.baeldung.com/jpa-optimistic-locking plus https://stackoverflow.com/questions/58786195/what-is-the-relation-between-spring-transactional-and-spring-lock-annotation/
Run the main
method in each module.
To get familiar with the sequence table feel free to create a datasource with intelliJ with the following steps:
Open a new query console and execute
CREATE TABLE PERSON
(
EMAIl VARCHAR(255) PRIMARY KEY NOT NULL,
FIRST_NAME VARCHAR(255) NOT NULL,
LAST_NAME VARCHAR(255) NOT NULL
);
https://dzone.com/articles/spring-transaction-propagation
https://www.postgresql.org/docs/9.5/transaction-iso.html
https://docs.jboss.org/hibernate/core/3.3/reference/en/html/objectstate.html#objectstate-modifying
https://docs.spring.io/spring-boot/docs/2.1.0.M1/reference/html/howto-database-initialization.html
http://maven.apache.org/pom.html#Inheritance
https://howtodoinjava.com/maven/maven-parent-child-pom-example