|
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. scrollableResults = criteria.scroll(ScrollMode.FORWARD_ONLY);
Actual: Hibernate is loading the row with null object in between the list returned as shown below: [testObj1, testobj2, null, testobj3]
Expected: HIbernate should ignore that row or it should throw as error.
Let me know if need more information on this.
|