kitar / laravel-dynamodb

A DynamoDB based Eloquent model and Query builder for Laravel.
MIT License
179 stars 27 forks source link

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

Closed rubenspeculis closed 1 year ago

rubenspeculis commented 1 year ago

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

kitar commented 1 year ago

@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.

rubenspeculis commented 1 year ago

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.

kitar commented 1 year ago

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.

KamranBiglari commented 3 weeks ago

@kitar I want to use it with Nova and I have same issue. How can I implement getQuery method ?