masumsoft / express-cassandra

Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.
http://express-cassandra.readthedocs.io
GNU Lesser General Public License v3.0
227 stars 67 forks source link

TypeError: Cannot read property 'return_query' of undefined #199

Closed SuperMasterBlasterLaser closed 4 years ago

SuperMasterBlasterLaser commented 5 years ago

Hello. When I'm trying to make this query:

 let tasks = await db.models.instance.Task.find({task_status: constants.STATUS.ENQUEUED});

It returns to me this error:

(node:5136) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'return_query' of undefined
at Function.f [as find] (D:\Phantasy star\Mobi\Daniars_Project\smartcontract\conductor-global-worker\node_modules\express-cassandra\lib\orm\base_model.js:743:50)
at executeTasks (D:\Phantasy star\Mobi\Daniars_Project\smartcontract\conductor-global-worker\app\main.js:46:44)
at D:\Phantasy star\Mobi\Daniars_Project\smartcontract\conductor-global-worker\app\main.js:61:5
at D:\Phantasy star\Mobi\Daniars_Project\smartcontract\conductor-global-worker\node_modules\express-cassandra\lib\orm\base_model.js:351:9
at Function.f [as _sync_graph] (D:\Phantasy star\Mobi\Daniars_Project\smartcontract\conductor-global-worker\node_modules\express-cassandra\lib\orm\base_model.js:261:3)
at D:\Phantasy star\Mobi\Daniars_Project\smartcontract\conductor-global-worker\node_modules\express-cassandra\lib\orm\base_model.js:344:13
at Function.f [as _sync_es_index] (D:\Phantasy star\Mobi\Daniars_Project\smartcontract\conductor-global-worker\node_modules\express-cassandra\lib\orm\bas
kuksik commented 4 years ago

@SuperMasterBlasterLaser did you resolve this one?

kuksik commented 4 years ago

https://express-cassandra.readthedocs.io/en/stable/usage/#built-in-promise-support

SuperMasterBlasterLaser commented 4 years ago

This problem was about three months ago. I think I had resolved this, but I forgot what I did.