throw new RuntimeException("You have entityType="+entityType.getName()+" so that class needs the NoSqlEntity annotation" +
" since field has OneToMany annotation. field="+field.getDeclaringClass().getName()+"."+field.getName()+" (or your wrote in the wrong entityType??)");
MetaAbstractClass<?> fkMeta = metaInfo.findOrCreate(entityType);
if(field.getType().equals(CursorToMany.class)) {
MetaCursorField metaField = metaCursorProvider.get();
metaField.setup(t, field, colName, ownerMeta, fkMeta);
return metaField;
}
//field's type must be Map or List right now today
if(!field.getType().equals(Map.class) && !field.getType().equals(List.class)
&& !field.getType().equals(Set.class) && !field.getType().equals(Collection.class))
throw new RuntimeException("field="+field+" must be Set, Collection, List or Map since it is annotated with OneToMany");
MetaToManyField metaField = metaListProvider.get();
metaField.setup(t, field, colName, fkMeta, fieldForKey);
return metaField;
}