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.
Spring, Spring data jpa