laravel-dynamodb icon indicating copy to clipboard operation
laravel-dynamodb copied to clipboard

Call to undefined method Kitar\Dynamodb\Query\Builder::getQuery()

Open rubenspeculis opened this issue 2 years ago • 2 comments

Hi,

First thanks for the great work!

I am having an issue with the "missing" method getQuery() when attempting to fetch the records from a model via Laravel Nova.

I am using two databases, mysql and dynamdb. The system is writing to both. I cannot however read via Nova from the Dynamodb.

I get the above exception triggered from the BadMethodException on line 420 of Kitar\Dynamodb\Query\Builder.

From what I can understand of the Eloquent Query Builder all that getQuery() does is return the query object which be this stage is already defined.

Any assistance would be greatly appreciated.

Thanks

rubenspeculis avatar Sep 27 '22 04:09 rubenspeculis

@rubenspeculis Thanks for trying!

Are you trying to read a Kitar\Dynamodb\Model based model with Nova?

Many tools (including Nova) assume to use RDBs, so even if we solve getQuery(), it may be difficult to support.

However, it would definitely be useful if we could use Nova with DynamoDB. I'll do some research to see how likely it is to be supported.

kitar avatar Sep 27 '22 12:09 kitar

Thanks @kitar

I am using DynamoDB for a history of events store and using Nova would allow auditors to view it without additional coding on my team's part. Any assistance would be appreciated. Unfortunately work commitments prevent me from assisting at this time though I would be happy to test any ideas you may have.

Cheers.

rubenspeculis avatar Sep 27 '22 21:09 rubenspeculis

Nova assumes Eloquent, and Eloquent assumes RDB, so I don't think supporting it is a good idea at this time. Thus I'll close this issue, but please feel free to open an issue about Nova support if there's any possibility.

kitar avatar Dec 12 '22 06:12 kitar