Skip to content

Commit 4273f1c

Browse files
committed
HHH-19150 Restore Envers (was removed as part of HHH-19170)
Revert "HHH-19170 - Move hibernate-envers to separate repository" This reverts commit b2a528f. This reverts commit 9c7dd3b.
1 parent c28115e commit 4273f1c

File tree

1,323 files changed

+135364
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,323 files changed

+135364
-3
lines changed

documentation/documentation.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ dependencies {
125125
reportAggregation project( ':hibernate-agroal' )
126126
reportAggregation project( ':hibernate-c3p0' )
127127
reportAggregation project( ':hibernate-core' )
128+
reportAggregation project(':hibernate-envers')
128129
reportAggregation project(':hibernate-graalvm')
129130
reportAggregation project(':hibernate-hikaricp')
130131
reportAggregation project(':hibernate-jcache')
@@ -139,6 +140,9 @@ dependencies {
139140
core project( ':hibernate-core' )
140141
javadocSources project( path: ':hibernate-core', configuration: 'javadocSources' )
141142

143+
envers project( ':hibernate-envers' )
144+
javadocSources project( path: ':hibernate-envers', configuration: 'javadocSources' )
145+
142146
testing project( ':hibernate-testing' )
143147

144148
spatial project( ':hibernate-spatial' )

documentation/src/main/asciidoc/userguide/Hibernate_User_Guide.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ include::chapters/query/native/Native.adoc[]
3737
include::chapters/query/spatial/Spatial.adoc[]
3838
include::chapters/query/extensions/Vector.adoc[]
3939
include::chapters/multitenancy/MultiTenancy.adoc[]
40+
include::chapters/envers/Envers.adoc[]
4041
include::chapters/beans/Beans.adoc[]
4142
include::chapters/portability/Portability.adoc[]
4243
include::chapters/statistics/Statistics.adoc[]

documentation/src/main/asciidoc/userguide/chapters/envers/Envers.adoc

+1,659
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
select
2+
c.id as id1_3_,
3+
c.REV as REV2_3_,
4+
c.REVTYPE as REVTYPE3_3_,
5+
c.REVEND as REVEND4_3_,
6+
c.created_on as created_5_3_,
7+
c.firstName as firstNam6_3_,
8+
c.lastName as lastName7_3_,
9+
c.address_id as address_8_3_
10+
from
11+
Customer_AUD c
12+
where
13+
c.address_id = ?
14+
order by
15+
c.lastName desc
16+
limit ?
17+
offset ?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
select
2+
c.id as id1_3_,
3+
c.REV as REV2_3_,
4+
c.REVTYPE as REVTYPE3_3_,
5+
c.REVEND as REVEND4_3_,
6+
c.created_on as created_5_3_,
7+
c.firstName as firstNam6_3_,
8+
c.lastName as lastName7_3_,
9+
c.address_id as address_8_3_
10+
from
11+
Customer_AUD c
12+
where
13+
c.address_id = ?
14+
order by
15+
c.REV asc
16+
17+
-- binding parameter [1] as [BIGINT] - [1]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
select
2+
c.id as id1_3_,
3+
c.REV as REV2_3_,
4+
c.REVTYPE as REVTYPE3_3_,
5+
c.REVEND as REVEND4_3_,
6+
c.created_on as created_5_3_,
7+
c.firstName as firstNam6_3_,
8+
c.lastName as lastName7_3_,
9+
c.address_id as address_8_3_
10+
from
11+
Customer_AUD c
12+
where
13+
c.address_id in (
14+
? , ?
15+
)
16+
order by
17+
c.REV asc
18+
19+
-- binding parameter [1] as [BIGINT] - [1]
20+
-- binding parameter [2] as [BIGINT] - [2]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
delete
2+
from
3+
Customer
4+
where
5+
id = ?
6+
7+
-- binding parameter [1] as [BIGINT] - [1]
8+
9+
insert
10+
into
11+
REVINFO
12+
(REV, REVTSTMP)
13+
values
14+
(?, ?)
15+
16+
-- binding parameter [1] as [BIGINT] - [3]
17+
-- binding parameter [2] as [BIGINT] - [1500906092876]
18+
19+
insert
20+
into
21+
Customer_AUD
22+
(REVTYPE, created_on, firstName, lastName, id, REV)
23+
values
24+
(?, ?, ?, ?, ?, ?)
25+
26+
-- binding parameter [1] as [INTEGER] - [2]
27+
-- binding parameter [2] as [TIMESTAMP] - [null]
28+
-- binding parameter [3] as [VARCHAR] - [null]
29+
-- binding parameter [4] as [VARCHAR] - [null]
30+
-- binding parameter [5] as [BIGINT] - [1]
31+
-- binding parameter [6] as [INTEGER] - [3]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
insert
2+
into
3+
Customer
4+
(created_on, firstName, lastName, id)
5+
values
6+
(?, ?, ?, ?)
7+
8+
-- binding parameter [1] as [TIMESTAMP] - [Mon Jul 24 17:21:32 EEST 2017]
9+
-- binding parameter [2] as [VARCHAR] - [John]
10+
-- binding parameter [3] as [VARCHAR] - [Doe]
11+
-- binding parameter [4] as [BIGINT] - [1]
12+
13+
insert
14+
into
15+
REVINFO
16+
(REV, REVTSTMP)
17+
values
18+
(?, ?)
19+
20+
-- binding parameter [1] as [BIGINT] - [1]
21+
-- binding parameter [2] as [BIGINT] - [1500906092803]
22+
23+
insert
24+
into
25+
Customer_AUD
26+
(REVTYPE, created_on, firstName, lastName, id, REV)
27+
values
28+
(?, ?, ?, ?, ?, ?)
29+
30+
-- binding parameter [1] as [INTEGER] - [0]
31+
-- binding parameter [2] as [TIMESTAMP] - [Mon Jul 24 17:21:32 EEST 2017]
32+
-- binding parameter [3] as [VARCHAR] - [John]
33+
-- binding parameter [4] as [VARCHAR] - [Doe]
34+
-- binding parameter [5] as [BIGINT] - [1]
35+
-- binding parameter [6] as [INTEGER] - [1]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
create table Customer (
2+
id bigint not null,
3+
created_on timestamp,
4+
firstName varchar(255),
5+
lastName varchar(255),
6+
primary key (id)
7+
)
8+
9+
create table Customer_AUD (
10+
id bigint not null,
11+
REV integer not null,
12+
REVTYPE tinyint,
13+
created_on timestamp,
14+
firstName varchar(255),
15+
lastName varchar(255),
16+
primary key (id, REV)
17+
)
18+
19+
create table REVINFO (
20+
REV integer generated by default as identity,
21+
REVTSTMP bigint,
22+
primary key (REV)
23+
)
24+
25+
alter table Customer_AUD
26+
add constraint FK5ecvi1a0ykunrriib7j28vpdj
27+
foreign key (REV)
28+
references REVINFO
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
select
2+
c.id as id1_1_,
3+
c.REV as REV2_1_,
4+
c.REVTYPE as REVTYPE3_1_,
5+
c.created_on as created_4_1_,
6+
c.firstName as firstNam5_1_,
7+
c.lastName as lastName6_1_
8+
from
9+
Customer_AUD c
10+
where
11+
c.REV = (
12+
select
13+
max( c_max.REV )
14+
from
15+
Customer_AUD c_max
16+
where
17+
c_max.REV <= ?
18+
and c.id = c_max.id
19+
)
20+
and c.REVTYPE <> ?
21+
22+
-- binding parameter [1] as [INTEGER] - [1]
23+
-- binding parameter [2] as [INTEGER] - [2]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
select
2+
c.REV as col_0_0_
3+
from
4+
Customer_AUD c
5+
cross join
6+
REVINFO r
7+
where
8+
c.id = ?
9+
and c.REV = r.REV
10+
order by
11+
c.REV asc
12+
13+
-- binding parameter [1] as [BIGINT] - [1]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
update
2+
Customer
3+
set
4+
created_on=?,
5+
firstName=?,
6+
lastName=?
7+
where
8+
id=?
9+
10+
-- binding parameter [1] as [TIMESTAMP] - [2017-07-24 17:21:32.757]
11+
-- binding parameter [2] as [VARCHAR] - [John]
12+
-- binding parameter [3] as [VARCHAR] - [Doe Jr.]
13+
-- binding parameter [4] as [BIGINT] - [1]
14+
15+
insert
16+
into
17+
REVINFO
18+
(REV, REVTSTMP)
19+
values
20+
(?, ?)
21+
22+
-- binding parameter [1] as [BIGINT] - [2]
23+
-- binding parameter [2] as [BIGINT] - [1500906092853]
24+
25+
insert
26+
into
27+
Customer_AUD
28+
(REVTYPE, created_on, firstName, lastName, id, REV)
29+
values
30+
(?, ?, ?, ?, ?, ?)
31+
32+
-- binding parameter [1] as [INTEGER] - [1]
33+
-- binding parameter [2] as [TIMESTAMP] - [2017-07-24 17:21:32.757]
34+
-- binding parameter [3] as [VARCHAR] - [John]
35+
-- binding parameter [4] as [VARCHAR] - [Doe Jr.]
36+
-- binding parameter [5] as [BIGINT] - [1]
37+
-- binding parameter [6] as [INTEGER] - [2]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
create table Customer (
2+
id bigint not null,
3+
created_on timestamp,
4+
firstName varchar(255),
5+
lastName varchar(255),
6+
primary key (id)
7+
)
8+
9+
create table Customer_AUD (
10+
id bigint not null,
11+
REV integer not null,
12+
REVTYPE tinyint,
13+
REVEND integer,
14+
created_on timestamp,
15+
firstName varchar(255),
16+
lastName varchar(255),
17+
primary key (id, REV)
18+
)
19+
20+
create table REVINFO (
21+
REV integer generated by default as identity,
22+
REVTSTMP bigint,
23+
primary key (REV)
24+
)
25+
26+
alter table Customer_AUD
27+
add constraint FK5ecvi1a0ykunrriib7j28vpdj
28+
foreign key (REV)
29+
references REVINFO
30+
31+
alter table Customer_AUD
32+
add constraint FKqd4fy7ww1yy95wi4wtaonre3f
33+
foreign key (REVEND)
34+
references REVINFO
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
select
2+
c.id as id1_1_,
3+
c.REV as REV2_1_,
4+
c.REVTYPE as REVTYPE3_1_,
5+
c.REVEND as REVEND4_1_,
6+
c.created_on as created_5_1_,
7+
c.firstName as firstNam6_1_,
8+
c.lastName as lastName7_1_
9+
from
10+
Customer_AUD c
11+
where
12+
c.REV <= ?
13+
and c.REVTYPE <> ?
14+
and (
15+
c.REVEND > ?
16+
or c.REVEND is null
17+
)
18+
19+
-- binding parameter [1] as [INTEGER] - [1]
20+
-- binding parameter [2] as [INTEGER] - [2]
21+
-- binding parameter [3] as [INTEGER] - [1]

0 commit comments

Comments
 (0)