@PreUpdate method on a Embeddable null on the parent caused NullPointerException

Description

I have a class A with a relation to a BEmbeddable. The BEmbeddable have a @PreUpdate method.

When creating the entity A with BEmbeddable null, then save A, it tries to call the @PreUpdate on B which is null.

Basically the problem is that we try to call the method PreUpdate on a null element of B.

Stack trace of nullpointer in Debug:

Line 62 is `invoke0(method, obj, args)` with method = @PreUpdate method and obj is null.

Maybe a null check is missing in `performCallback:35, EmbeddableCallback org.hibernate.jpa.event.internal`

Printed stack trace:

Environment

Developpement

Status

Assignee

Vlad Mihalcea

Reporter

David Prévost

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