Initially my task was to filter the records by date for which I wrote the below query that returned no result even though I have 4 records in data store that meets the condition
ObjectifyService.run(() -> ObjectifyService.ofy().cache(false).load().type(SomeClass.class).filter("createdDate <", date.toString())
.list());
Note - I have the index for createdDate.
Later, Just wanted to check whether it is really fetching things, I wrote fetch all records which returns no results
ObjectifyService.run(() -> ObjectifyService.ofy().cache(false).load().type(SomeClass.class).list());
I have a method that queries on id and right now only that works.
ObjectifyService.run(() -> ObjectifyService.ofy().cache(false).load().type(SomeClass.class).id("someId").now());
Can't figure what's the issue here.
Below is the Entity itself
@Entity(name = "SomeClass")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Subclass
public class SomeClass implements Serializable {
@Id
private String id;
private int importId;
private String name;
private String value;
private Date lastModified;
@Index
private Date createdDate;
private List<SomeOtherClass> someOtherClass;
}
I feel this has something to do with @subclass annotation. Is it so?