From 3836dae4de94d7c1ae0e185c8000bbce570ec1e3 Mon Sep 17 00:00:00 2001 From: Ihar Hancharenka Date: Wed, 12 Jul 2023 21:38:53 +0300 Subject: [PATCH] m --- .../spring/data/jpa/features/audit-envers.txt | 8 +++++++ .../spring/data/jpa/features/mappings.txt | 22 +++++++++++++++++++ .../spring/data/jpa/features/projections.txt | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 pl/java/libfws/spring/data/jpa/features/mappings.txt diff --git a/pl/java/libfws/spring/data/jpa/features/audit-envers.txt b/pl/java/libfws/spring/data/jpa/features/audit-envers.txt index cb768cef0..98b27f9cb 100644 --- a/pl/java/libfws/spring/data/jpa/features/audit-envers.txt +++ b/pl/java/libfws/spring/data/jpa/features/audit-envers.txt @@ -1,4 +1,12 @@ https://docs.jboss.org/envers/docs/#configuration +https://spring.io/projects/spring-data-envers +https://github.com/hibernate/hibernate-orm/blob/main/hibernate-envers/src/main/java/org/hibernate/envers/configuration/EnversSettings.java + +spring.jpa.properties + org.hibernate.envers: + audit_strategy: class-name + audit_strategy_validity_store_revend_timestamp: bool + store_data_at_delete: bool 2023 https://habr.com/ru/post/715918/ diff --git a/pl/java/libfws/spring/data/jpa/features/mappings.txt b/pl/java/libfws/spring/data/jpa/features/mappings.txt new file mode 100644 index 000000000..a8e24cdf1 --- /dev/null +++ b/pl/java/libfws/spring/data/jpa/features/mappings.txt @@ -0,0 +1,22 @@ +https://www.baeldung.com/jpa-joincolumn-vs-mappedby + In a One-to-Many/Many-to-One relationship, + the owning side is usually defined on the many side of the relationship (joincolumn -> FK) + + The value of mappedBy (at non-owning reference side) + is the name of the association-mapping attribute (java) on the owning side + + cascade attr - on the owning side + +https://www.baeldung.com/jpa-join-column + The @JoinColumn annotation combined with a @OneToOne mapping indicates + that a given column in the owner entity refers to a primary key in the reference entity: + +@JoinFormula + +@ManyToOne + EAGER by default +@OneToMany + LAZY by default + +2021 +https://habr.com/ru/articles/542328/ diff --git a/pl/java/libfws/spring/data/jpa/features/projections.txt b/pl/java/libfws/spring/data/jpa/features/projections.txt index 33b6494c3..c39f03002 100644 --- a/pl/java/libfws/spring/data/jpa/features/projections.txt +++ b/pl/java/libfws/spring/data/jpa/features/projections.txt @@ -3,3 +3,5 @@ https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#projections 2020 https://thorben-janssen.com/spring-data-jpa-query-projections/ https://habr.com/ru/company/otus/blog/722060/ + +Can have multiple @Entity for the same table