NPE while deleting items from collection

Description

Hibernate throws a NPE while deleting objects from an entity with a query like this one:

The problem is present only from hibernate 4.2.2+, while versions up to version 4.2.1 it works fine.

The stack trace is:

The User class references a UserData class in this way:

While UserData is a simple class with only a couple strings and a reference @ManyToOne to the User class.

Environment

Spring, Spring data jpa

Assignee

Brett Meyer

Reporter

Alessandro Polverini

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Blocker
Configure