I ran the following query, and got an exception:
ObjectDatastore datastore = new AnnotationObjectDatastore(false);
List<Long> fanIds = new ArrayList<Long>();
fanIds.add(1l);
List<Fan> fans = datastore.find().type(Fan.class).activate(0)
.addFilter("id", FilterOperator.IN, fanIds).returnAll().now();
The Fan
entity has an id
property annotated with @Id
.
java.lang.IllegalArgumentException: @Id field must be stored as a Number or String but was class java.util.ArrayList. Use @Type to define the stored type and configure a type converter whichcan handle the conversion in both directions.
at com.google.code.twig.standard.StandardCommonLoadCommand.idToKey(StandardCommonLoadCommand.java:79)
at com.google.code.twig.standard.StandardCommonFindCommand.addFilter(StandardCommonFindCommand.java:100)
at com.google.code.twig.standard.StandardRootFindCommand.addFilter(StandardRootFindCommand.java:28)