ctripcorp / SQLlin

A DSL ORM library for Kotlin Multiplatform.
Apache License 2.0
219 stars 10 forks source link

How to nore the columns in model #74

Closed springeye closed 2 weeks ago

springeye commented 6 months ago

example:

@DBRow(tableName = "memo")
@Serializable
data class Memo(
    val id: Long,
    val createdTs: Long,
    val creatorId: Long,
    var content: String,
   @DbIgnore //ignore the colume
    val resourceList: MutableList<Resource> = mutableListOf()
)
qiaoyuang commented 6 months ago

Now, you can't ignore any property in the model, I am considering to support this feature in the future.

qiaoyuang commented 2 weeks ago

Hi, after version 1.3.2, you can use kotlinx.serialization.Transient to ignore properties in your models.