I have a question
# exposed
b
I have a question
Does anyone know if you can lazy load columns in exposed? I tried googling but wasn’t able to find any solid answers
I’m having an issue with having a huge blob as a column so it makes loading a ton of rows really slow
h
Hm, it should load lazily by default. Do you have a sample?
b
hmm looking now, I realize that the underlying column was actually set as ColumnType()
Untitled.cpp
I was doing something like this
Copy code
override fun readObject(rs: ResultSet, index: Int): Any? {
        val value = super.readObject(rs, index)
        return if (eagerLoading && value != null) {
            valueFromDB(value)
        } else {
            value
        }
    }
I took some inspiration from the
TextColumnType()
and it seems like it’s working now? but not sure any feedback is welcome
h
Yes, I would use the TextColumnType too. BTW you could use it as base class.