spring-data-couchbase: Spring boot: 3.2.0, Spring data Couchbase: 5.2.0: java.lang.IllegalArgumentException: Attribute of type java.util.Collections.SingletonList cannot be stored and must be converted.
Hi,
I am using Spring boot: 3.2.0 with Spring data Couchbase: 5.2.0
I have an entity defined with a field of type Object (this field can be everything (String or List…)):
public class Person {
@NotNull
@Id
private String id;
@NotNull
@Field
private String name;
@Field
private int age;
@Field
private Object myObject;
}
while trying to save it using this:
personRepository.save(new Person("1", "Alice", 25, Collections.singletonList("my issue")));
It failed on java.lang.IllegalArgumentException: Attribute of type java.util.Collections.SingletonList cannot be stored and must be converted.
it was working with previous version: Spring boot: 2.7.13, Spring data Couchbase: 4.4.13. demo.zip
Find attached the project where it failed: to reproduce, run PersonRepositoryTest
Any suggestion?
Thank you
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 17
Commits related to this issue
- Fix regression - unable to store and read properties of type Object. Closes #1875. — committed to spring-projects/spring-data-couchbase by mikereiche 3 years ago
- Fix regression - unable to store and read properties of type Object. (#1883) Closes #1875. — committed to spring-projects/spring-data-couchbase by mikereiche 3 years ago
- Fix regression - unable to store and read properties of type Object. (#1883) Closes #1875. — committed to spring-projects/spring-data-couchbase by mikereiche 3 years ago
- Fix regression - unable to store and read properties of type Object. (#1883) Closes #1875. — committed to spring-projects/spring-data-couchbase by mikereiche 3 years ago
- Fix regression - unable to store and read properties of type Object. (#1883) Closes #1875. — committed to spring-projects/spring-data-couchbase by mikereiche 3 years ago
Tomorrow. https://calendar.spring.io/
Thanks. I’ll investigate on Monday.