Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #2999

Closed
ilangranet opened this issue Dec 10, 2023 · 1 comment
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@ilangranet
Copy link

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 10, 2023
@ilangranet
Copy link
Author

open in spring data couchbase: spring-projects/spring-data-couchbase#1875

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants