Hi all. I have created some classes to manage pagination using ScrollableResults. Works fine, but when my entity has a composite id fails. This is my Entity:
@Entity public final class MyEntity implements java.io.Serializable{ private MyEntityId id; private String field1; private String field2; }
@Embeddable public final class MyEntityId implements java.io.Serializable{ private String property1; private boolean property2; }
I'm trying to execute an empty criteria, to get all records. When I execute:
criteria.scroll(ScrollMode.SCROLL_SENSITIVE);
I get: Failed to create ScrollPage: could not resolve property: property1 of: com.mycompany.mypackage.MyEntity
My Database engine is Oracle 9, that supports scrollable resultsets. I'm using annotated entities and Spring Session Factory to manage hibernate.
Any ideas?
|