@Immutable entities generate warning even if they are not referenced in query

Description

We get this warning when executing the reported query:

We execute the following code (simplified):

These two classes are mapped to the table PV_DB:

In the executed query, an object instanceof PvDb is referenced, but no PvDbTO. Nevertheless the warning is shown. The update is executed successfully.

Expected result: The update is executed successfully, but no warning is shown.

Environment

OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
Ubuntu 18.04 LTS
PostgreSQL 10+190ubuntu0.1

Assignee

Unassigned

Reporter

lukas.schmidt

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure