Brett Meyer commented on an issue
Hibernate ORM / Bug HHH-8508
org.hibernate.ScrollableResults returns null object if one of the property in composite key of view is null
Create one database view having composite ID (testid1, testid2, testid3, testid4). The view is creating union of the two table data. The testid3 can be nullable in DB. One of the record qualifing in view result is having testid3 as null.

Map the View using hibernate-mapping file.

Use org.hibernate.ScrollableResults to get the data from view.
 s...