Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Initial commits that enabled spotless automatic formatting
59731c089e9d649a663c81d9622b54557d6aba37
4d63ffd98cdead513ab0be0fa23f9787423092d3
# Envers removal/restore
9c7dd3bf34dfbb2f4fa9eb79a0294c2cc759c836
b2a528f2945cee26667b22b867ccef143b7c430c
4273f1cde06f3622f50c2846078398c1977a49c4
4 changes: 4 additions & 0 deletions documentation/documentation.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ dependencies {
reportAggregation project( ':hibernate-agroal' )
reportAggregation project( ':hibernate-c3p0' )
reportAggregation project( ':hibernate-core' )
reportAggregation project(':hibernate-envers')
reportAggregation project(':hibernate-graalvm')
reportAggregation project(':hibernate-hikaricp')
reportAggregation project(':hibernate-jcache')
Expand All @@ -139,6 +140,9 @@ dependencies {
core project( ':hibernate-core' )
javadocSources project( path: ':hibernate-core', configuration: 'javadocSources' )

envers project( ':hibernate-envers' )
javadocSources project( path: ':hibernate-envers', configuration: 'javadocSources' )

testing project( ':hibernate-testing' )

spatial project( ':hibernate-spatial' )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ include::chapters/query/native/Native.adoc[]
include::chapters/query/spatial/Spatial.adoc[]
include::chapters/query/extensions/Vector.adoc[]
include::chapters/multitenancy/MultiTenancy.adoc[]
include::chapters/envers/Envers.adoc[]
include::chapters/beans/Beans.adoc[]
include::chapters/portability/Portability.adoc[]
include::chapters/statistics/Statistics.adoc[]
Expand Down
1,659 changes: 1,659 additions & 0 deletions documentation/src/main/asciidoc/userguide/chapters/envers/Envers.adoc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
select
c.id as id1_3_,
c.REV as REV2_3_,
c.REVTYPE as REVTYPE3_3_,
c.REVEND as REVEND4_3_,
c.created_on as created_5_3_,
c.firstName as firstNam6_3_,
c.lastName as lastName7_3_,
c.address_id as address_8_3_
from
Customer_AUD c
where
c.address_id = ?
order by
c.lastName desc
limit ?
offset ?
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
select
c.id as id1_3_,
c.REV as REV2_3_,
c.REVTYPE as REVTYPE3_3_,
c.REVEND as REVEND4_3_,
c.created_on as created_5_3_,
c.firstName as firstNam6_3_,
c.lastName as lastName7_3_,
c.address_id as address_8_3_
from
Customer_AUD c
where
c.address_id = ?
order by
c.REV asc

-- binding parameter [1] as [BIGINT] - [1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
select
c.id as id1_3_,
c.REV as REV2_3_,
c.REVTYPE as REVTYPE3_3_,
c.REVEND as REVEND4_3_,
c.created_on as created_5_3_,
c.firstName as firstNam6_3_,
c.lastName as lastName7_3_,
c.address_id as address_8_3_
from
Customer_AUD c
where
c.address_id in (
? , ?
)
order by
c.REV asc

-- binding parameter [1] as [BIGINT] - [1]
-- binding parameter [2] as [BIGINT] - [2]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
delete
from
Customer
where
id = ?

-- binding parameter [1] as [BIGINT] - [1]

insert
into
REVINFO
(REV, REVTSTMP)
values
(?, ?)

-- binding parameter [1] as [BIGINT] - [3]
-- binding parameter [2] as [BIGINT] - [1500906092876]

insert
into
Customer_AUD
(REVTYPE, created_on, firstName, lastName, id, REV)
values
(?, ?, ?, ?, ?, ?)

-- binding parameter [1] as [INTEGER] - [2]
-- binding parameter [2] as [TIMESTAMP] - [null]
-- binding parameter [3] as [VARCHAR] - [null]
-- binding parameter [4] as [VARCHAR] - [null]
-- binding parameter [5] as [BIGINT] - [1]
-- binding parameter [6] as [INTEGER] - [3]
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
insert
into
Customer
(created_on, firstName, lastName, id)
values
(?, ?, ?, ?)

-- binding parameter [1] as [TIMESTAMP] - [Mon Jul 24 17:21:32 EEST 2017]
-- binding parameter [2] as [VARCHAR] - [John]
-- binding parameter [3] as [VARCHAR] - [Doe]
-- binding parameter [4] as [BIGINT] - [1]

insert
into
REVINFO
(REV, REVTSTMP)
values
(?, ?)

-- binding parameter [1] as [BIGINT] - [1]
-- binding parameter [2] as [BIGINT] - [1500906092803]

insert
into
Customer_AUD
(REVTYPE, created_on, firstName, lastName, id, REV)
values
(?, ?, ?, ?, ?, ?)

-- binding parameter [1] as [INTEGER] - [0]
-- binding parameter [2] as [TIMESTAMP] - [Mon Jul 24 17:21:32 EEST 2017]
-- binding parameter [3] as [VARCHAR] - [John]
-- binding parameter [4] as [VARCHAR] - [Doe]
-- binding parameter [5] as [BIGINT] - [1]
-- binding parameter [6] as [INTEGER] - [1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
create table Customer (
id bigint not null,
created_on timestamp,
firstName varchar(255),
lastName varchar(255),
primary key (id)
)

create table Customer_AUD (
id bigint not null,
REV integer not null,
REVTYPE tinyint,
created_on timestamp,
firstName varchar(255),
lastName varchar(255),
primary key (id, REV)
)

create table REVINFO (
REV integer generated by default as identity,
REVTSTMP bigint,
primary key (REV)
)

alter table Customer_AUD
add constraint FK5ecvi1a0ykunrriib7j28vpdj
foreign key (REV)
references REVINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
select
c.id as id1_1_,
c.REV as REV2_1_,
c.REVTYPE as REVTYPE3_1_,
c.created_on as created_4_1_,
c.firstName as firstNam5_1_,
c.lastName as lastName6_1_
from
Customer_AUD c
where
c.REV = (
select
max( c_max.REV )
from
Customer_AUD c_max
where
c_max.REV <= ?
and c.id = c_max.id
)
and c.REVTYPE <> ?

-- binding parameter [1] as [INTEGER] - [1]
-- binding parameter [2] as [INTEGER] - [2]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
select
c.REV as col_0_0_
from
Customer_AUD c
cross join
REVINFO r
where
c.id = ?
and c.REV = r.REV
order by
c.REV asc

-- binding parameter [1] as [BIGINT] - [1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
update
Customer
set
created_on=?,
firstName=?,
lastName=?
where
id=?

-- binding parameter [1] as [TIMESTAMP] - [2017-07-24 17:21:32.757]
-- binding parameter [2] as [VARCHAR] - [John]
-- binding parameter [3] as [VARCHAR] - [Doe Jr.]
-- binding parameter [4] as [BIGINT] - [1]

insert
into
REVINFO
(REV, REVTSTMP)
values
(?, ?)

-- binding parameter [1] as [BIGINT] - [2]
-- binding parameter [2] as [BIGINT] - [1500906092853]

insert
into
Customer_AUD
(REVTYPE, created_on, firstName, lastName, id, REV)
values
(?, ?, ?, ?, ?, ?)

-- binding parameter [1] as [INTEGER] - [1]
-- binding parameter [2] as [TIMESTAMP] - [2017-07-24 17:21:32.757]
-- binding parameter [3] as [VARCHAR] - [John]
-- binding parameter [4] as [VARCHAR] - [Doe Jr.]
-- binding parameter [5] as [BIGINT] - [1]
-- binding parameter [6] as [INTEGER] - [2]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
create table Customer (
id bigint not null,
created_on timestamp,
firstName varchar(255),
lastName varchar(255),
primary key (id)
)

create table Customer_AUD (
id bigint not null,
REV integer not null,
REVTYPE tinyint,
REVEND integer,
created_on timestamp,
firstName varchar(255),
lastName varchar(255),
primary key (id, REV)
)

create table REVINFO (
REV integer generated by default as identity,
REVTSTMP bigint,
primary key (REV)
)

alter table Customer_AUD
add constraint FK5ecvi1a0ykunrriib7j28vpdj
foreign key (REV)
references REVINFO

alter table Customer_AUD
add constraint FKqd4fy7ww1yy95wi4wtaonre3f
foreign key (REVEND)
references REVINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
select
c.id as id1_1_,
c.REV as REV2_1_,
c.REVTYPE as REVTYPE3_1_,
c.REVEND as REVEND4_1_,
c.created_on as created_5_1_,
c.firstName as firstNam6_1_,
c.lastName as lastName7_1_
from
Customer_AUD c
where
c.REV <= ?
and c.REVTYPE <> ?
and (
c.REVEND > ?
or c.REVEND is null
)

-- binding parameter [1] as [INTEGER] - [1]
-- binding parameter [2] as [INTEGER] - [2]
-- binding parameter [3] as [INTEGER] - [1]
Loading
Loading