Company
Date Published
Author
David Ostrovsky, Senior Solutions Architect, Couchbase
Word count
254
Language
English
Hacker News points
None

Summary

A recent change in Couchbase Server 4.1 regarding the way N1QL returns results for star queries has affected the deserialization process in the .NET SDK, resulting in the Query<> method yielding the correct number of results but with properties set to their default values. This issue occurs because the query SELECT * FROM default now returns JSON results with each document nested under the bucket's name, contrasting with the earlier format where results were returned as an array of JSON document bodies, which the .NET SDK was designed to handle. To address this, it is recommended to modify the query to SELECT default.* FROM default, which adjusts the output to the expected format and ensures that objects are returned with correctly deserialized values.