You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a method findByPostsContainingAndPublished(String slug, Booolean ispublished) this should look for a string in a Set.
For my understanding this should work, looking for a string in the set
Actual Behavior
I get:
class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap') java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap') at com.amazonaws.services.dynamodbv2.datamodeling.StandardTypeConverters$Vector$ToSet$1.convert(StandardTypeConverters.java:449) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter$DelegateConverter.convert(DynamoDBTypeConverter.java:104) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter$NullSafeConverter.convert(DynamoDBTypeConverter.java:123) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter$ExtendedConverter.convert(DynamoDBTypeConverter.java:83) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperFieldModel.convert(DynamoDBMapperFieldModel.java:138)
My Model:
@DynamoDBTable(tableName = "products")
public class Product {
private Set<String> posts;
public Set<String> getPosts() {
return posts;
}
public void setPosts(Set<String> posts) {
this.posts = posts;
}
}
Expected Behavior
I have a method findByPostsContainingAndPublished(String slug, Booolean ispublished) this should look for a string in a Set.
For my understanding this should work, looking for a string in the set
Actual Behavior
I get:
class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap') java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap') at com.amazonaws.services.dynamodbv2.datamodeling.StandardTypeConverters$Vector$ToSet$1.convert(StandardTypeConverters.java:449) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter$DelegateConverter.convert(DynamoDBTypeConverter.java:104) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter$NullSafeConverter.convert(DynamoDBTypeConverter.java:123) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter$ExtendedConverter.convert(DynamoDBTypeConverter.java:83) at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperFieldModel.convert(DynamoDBMapperFieldModel.java:138)
My Model:
And my repository method:
List<Product> findByPostsContainingAndPublished(String slug, Boolean published);
Specifications
The text was updated successfully, but these errors were encountered: