how is the `@Ignore` annotation used for room in K...
# android
m
how is the
@Ignore
annotation used for room in Kotlin? what I want is something like this:
Copy code
@Entity
data class Foo(
    @PrimaryKey(autoGenerate = true) val id: Long,
    val name: String = "",
    @Ignore val bars: List<Bar> = listOf()
)
but I get
Entities and POJOs must have a usable public constructor.
Bar
is another entity and the lists will be ideally constructed at the repository level like so
Copy code
suspend fun observeAll(): Flow<List<Foo>> {
        return fooDao.observeAll().map { list -> list.map { foo ->
            val bars = barDao.getBarsByFooId(foo.id).map { it.bar }
            foo.copy(bars = bars)
        } }
    }