error_on_load
column loader strategy for marking column properties that should not be loaded.
It is similar to the deferred loader strategy, but causes an exception to be raised if a column would be loaded by a subsequent (deferred) query. Use error_on_load(k)
instead of defer(k)
to construct a query option that will cause an exception if an attempt is made to load column k
.
This is handy when constructing a query with deferred columns (to optimize load time). It will cause an exception to be raised in your program instead of causing dramatic slowdown due to many deferred-load queries when you accidentally marked a column as deferred that should be loaded eagerly. Fail early.