MappingCouchbaseConverter.read() is not recursive
See original GitHub issueUsing Cluster.query()
I’m parsing the result into classes that have child object.
A quick exemple to visualise :
@Data
public class A {
String someProp;
SubA nestedObject;
@Data
public static SubA() {
String someNestedProp;
}
}
Doing converter.read(A.class, document)
leads to nestedObject
being a HashMap<String, String>
instead of a SubA
as anyone would expect. Am I doing this wrong or are my expectations correct ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:22
Top Results From Across the Web
MappingCouchbaseConverter (Spring Data Couchbase 5.0.0 ...
The converter is responsible for reading from and writing to entities and converting it into a consumable database representation.
Read more >Non recursive scan for packages in Spring - Stack Overflow
Apparently, AnnotationConfigApplicationContext#scan() scans for packages recursively. I am not sure of it, but one of my @Component classes ...
Read more >org.springframework.data.couchbase.core.mapping ...
Retruns the size of the attributes in this and recursive documents. verifyValueType. Verifies that only values of a certain and supported type can...
Read more >Recursion is not hard: a step-by-step walkthrough of this ...
The base case is false, so enter the recursive condition. The execution stack places factorial() a second time with num-1 = 4 as...
Read more >Java 8 fast non recursive fibonacci - Softhints
The method next() calculate the next element of the sequence. In the main we instantiate new Fibon object and when call method next()...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m going to keep this open as someone else hit this and I need to update the documentation.
There are samples in src/test/java/org/springframework/data/couchbase/repository/query/CouchbaseRepositoryQuerydslIntegrationTests.java They run with
Bonus - to only create the bucket once and not delete it at the end of the tests.
src/test/java/org/springframework/data/couchbase/util/UnmanagedTestCluster.java 63 bucketname = “my_bucket”; // UUID.randomUUID().toString();