Litote / kmongo

[deprecated] KMongo - a Kotlin toolkit for Mongo
https://litote.org/kmongo/
Apache License 2.0
781 stars 75 forks source link

@Transient from kotlin serialization does not deserialize data? #414

Closed ronjunevaldoz closed 1 year ago

ronjunevaldoz commented 1 year ago

In the below data class, for example using aggregation to get the data, the @Transient field is expected to return a value from mongodb data. But it doesn't work.

@Serializable
data class Test(
    val readWrite : String,
    @Transient readOnly: String
)
zigzago commented 1 year ago

Not sure to understand the use case. If I look at the doc: https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-transient/

image