spotorm / spot2

Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer
http://phpdatamapper.com
BSD 3-Clause "New" or "Revised" License
601 stars 101 forks source link

The search method is deprecated ? #254

Closed diego-sorribas closed 3 years ago

diego-sorribas commented 6 years ago

Hello, I have an error when using the search method of Query class, it throw me this exception:

Call to undefined method Spot\Entity\Manager::datasourceOptions()

Which is the best way to do a search?

Thanks!

FlipEverything commented 6 years ago

I'am not familiar with the search method. Maybe I'm blind but could not find anything useful in the commit history either. @vlucas could you please help us out?

vlucas commented 6 years ago

That's a bug. That should be a call to tableOptions instead.

Looks like there is a test Entity for searching, but no actual search performed in the tests or this would have been caught: https://github.com/spotorm/spot2/blob/e3c98c8fc212dc1ff83fabbea77048fb7691b12a/tests/Entity/Event/Search.php