adobnikar / bookshelf-eloquent

Bookshelf extension that adds functionality of eloquent.
MIT License
30 stars 8 forks source link

Cloning problem #11

Open zailtoncalheiros opened 5 years ago

zailtoncalheiros commented 5 years ago

When I try to clone a model instance, I get the following error: "Query building tasks of a nested where query were not completed."

I think it happens because instance.eloquent.queryBuilderTasksAsync is not being cloned too.

When I do cloned.eloquent.queryBuilderTasksAsync = query.eloquent.queryBuilderTasksAsync.slice();, it seems to work properly.

zailtoncalheiros commented 5 years ago

By the way, I got this error because I was doing pagination by myself, but I think that using 'pagination' plugin will cause the same issue because it also seems to use the clone function.

ksromero commented 4 years ago

any update on this?