Wrong audit data of ElementCollection attribute of map

Description

For example.

In TestEntity table:

id

1

In TestEntity_embs1

TestEntity_id

emb1_KEY

value

1

a

value1

1

b

value2

In TestEntity_embs1_AUD

REV

REVTYPE

TestEntity_id

emb1_KEY

value

REVEND

REVEND_TSTMP

1

0

1

a

value1

NULL

NULL

1

0

1

b

value2

NULL

NULL

All is ok. but if i edit the entity like this:

In TestEntity_embs1_AUD

REV

REVTYPE

TestEntity_id

emb1_KEY

value

REVEND

REVEND_TSTMP

1

0

1

a

value1

2

2018-05-21 15:18:26.8850000

1

0

1

b

value2

2

2018-05-21 15:18:26.8850000

2

0

1

a

value3

NULL

NULL

2

0

1

b

value2

2

2018-05-21 15:18:26.8850000

2

2

1

a

value1

NULL

NULL

2

2

1

b

value2

NULL

NULL

If I want to find the audit data of TestEntity with id 1, it return that:

{b: "value2} is missing in the latest reversion.

If I change the data in datebase by sql to these:

REV

REVTYPE

TestEntity_id

emb1_KEY

value

REVEND

REVEND_TSTMP

1

0

1

a

value1

2

2018-05-21 15:18:26.8850000

1

0

1

b

value2

2

2018-05-21 15:18:26.8850000

2

0

1

a

value3

NULL

NULL

2

0

1

b

value2

NULL

NULL

2

2

1

a

value1

2

2018-05-21 15:18:26.8850000

2

2

1

b

value2

2

2018-05-21 15:18:26.8850000

All is ok. I think it is a serious bug. it destory the function of audit of ElementCollection.

Environment

None

Status

Assignee

Chris Cranford

Reporter

Xj Chen

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Blocker
Configure