@OneToOne association, Nullable check does is not skipped for @NotFound(action = NotFoundAction.IGNORE)

Description

I have 2 entities with the following

Entity A that contains:

Entity B that contains:

When I try to persist an object A wth b = null, I got the following exception

A workaround is to disable the nullability validator.

Otherwise, I've found the field b of class A is considered as not nullable. This seems to happen in the OneToOneSecondPass class that do not consider the @NotFound annotation. Then the built property has optional = false and this become nullable = false when the entity model is built.

Environment

5.2.5, H2

Activity

Show:
Andrea Boriero
March 23, 2017, 2:48 PM

,

sorry but not able to reproduce this for @manyToOne.

Artem K.
March 23, 2017, 3:39 PM

Attaching a modified OP test case which fails on @ManyToOne

Artem K.
March 23, 2017, 3:43 PM

Oops, I guess the attachment didn't work as I expected. I guess I may need to open a new Jira ticket after all.

Artem K.
March 23, 2017, 3:48 PM

ManyToOne test case attached to the new issue you created.

Jeremy Carnus
August 8, 2017, 1:33 PM

Hi,
Do we have any news regarding the final resolution of this ?
Thanks

Assignee

Andrea Boriero

Reporter

Jeremy Carnus

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