The issue when exporting was both export and re-render are happening in the single request. The 2nd time query is built, it starts fresh (from builder method) but columns are already resolved.
Column doesn't have any join info stored in it so the join is missing and thus generating Unknown column error. It is because resolveColumnName will change query directly.
That being said, there is a workaround for this bug. If we define builder function in our class, and we do a manual join there, then everything will be fine. But still, I think this one should be solved in the library.
This one should solve #505
The issue when exporting was both export and re-render are happening in the single request. The 2nd time query is built, it starts fresh (from builder method) but columns are already resolved.
Column doesn't have any join info stored in it so the join is missing and thus generating Unknown column error. It is because resolveColumnName will change query directly.
That being said, there is a workaround for this bug. If we define builder function in our class, and we do a manual join there, then everything will be fine. But still, I think this one should be solved in the library.