SQLlin icon indicating copy to clipboard operation
SQLlin copied to clipboard

How to nore the columns in model

Open springeye opened this issue 1 year ago • 1 comments

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()
)

springeye avatar Jan 09 '24 04:01 springeye

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

qiaoyuang avatar Jan 09 '24 04:01 qiaoyuang

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

qiaoyuang avatar Jun 19 '24 02:06 qiaoyuang