Use of @NotFound(IGNORE) and @BatchSize when there are unresolved foreign key values results in extra queries

Description

When accessing a unidirectional OneToOne association where there are unresolvable foreign key references when batching is enabled with @NotFound(IGNORE), each association access in a loop re-queries for all the unresolved foreign keys:

In the log capture above, the second query is redundant and unexpected.

Environment

None

Status

Assignee

Gail Badner

Reporter

Stephen Fikes

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure