HHH-12770 - Document @NotFound(action = NotFoundAction.IGNORE) and FetchType.LAZY behavior

Description

Hello,

I have a table GD_CODE with 2 columns (PrimaryKey)

GD_CODEID
GD_CODETYPE

For this table a have a class

GenericCode

This table is referenced from other clases per example in this way

TABLE A

GD_CODEID

All is fine but if in some records for A the GD_CODEID is NULL when querying for the A class a unnecessary SELECT is done to retrieve the GenericCode, that is not neccessary as the GD_CODEID is NULL so won't be a relation.

This is performance problem when there are too many record in A that have GD_CODEID as NULL

Is there anyway to avoid this unncessary SELECTS ?

Thank you!

Environment

None

Status

Assignee

Vlad Mihalcea

Reporter

Fernando Guardiola Ruiz

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