could not find implicit value for parameter f: slick.jdbc.GetResult[com.vividsolutions.jts.geom.Point]
See original GitHub issueI am trying to run a custom query in Slick and map the result to a custom case class as follows:
case class BusinessDistanceResult(businessId: Long, userId: String, name: String, location: Point, address: Option[String], phonenumber: Option[String], email: Option[String], distance: Float )
object BusinessDistanceResult {
implicit val getMyMatch = GetResult(r => BusinessDistanceResult(r.<<, r.<<, r.<<, r.<<[Point], r.<<, r.<<, r.<<, r.<<))
}
And here is my Query
def businessNearLocation(locationRadiusInput: LocationRadiusInput) =
sql"""SELECT businessId, userId, name, location, address, phonenumber, email, ST_Distance(location, ref_geom) AS distance
|FROM business
|CROSS JOIN (SELECT ST_MakePoint(${locationRadiusInput.longitude}, ${locationRadiusInput.latitude})::geography AS ref_geom) AS r
|WHERE ST_DWithin(location, ref_geom, ${locationRadiusInput.radius})
|ORDER BY ST_Distance(location, ref_geom)""".as[BusinessDistanceResult]
However It is throwing the compilation Error:
could not find implicit value for parameter f: slick.jdbc.GetResult[com.vividsolutions.jts.geom.Point]
[error] implicit val getMyMatch = GetResult(r => BusinessDistanceResult(r.<<, r.<<, r.<<, r.<<[Point], r.<<, r.<<, r.<<, r.<<))
But from my understanding, this implicit conversion should of been taken care of the implicits I declared in my class:
object MyAPI extends API with ArrayImplicits
with DateTimeImplicits
with JsonImplicits
with NetImplicits
with LTreeImplicits
with RangeImplicits
with HStoreImplicits
with SearchImplicits
with PostGISImplicits
with PostGISAssistants
Is there something I am missing?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Slick 3.0.3 error: could not find implicit value for parameter rconv
I have the model as Tables.scala generated with Slick 3.0.3 that includes the GetResult implicit conversion from a result set for all my...
Read more >Could not find implicit value for parameter tt: slick.ast ... - GitHub
I'm new to scala and I'm trying to integrate a PostgreSQL database to a Lagom application written in scala.I'm trying to utilise the...
Read more >[Solved]-Slick: could not find implicit value for parameter e ...
Coding example for the question Slick: could not find implicit value for parameter e: slick.jdbc.SetParameter[Option[java.util.UUID]]-postgresql.
Read more >Implicit Resolution Gotcha - Abhishek's Tech Dojo
While working on Slick and interesting scenario of implicit resolution ... could not find implicit value for parameter rconv: slick.jdbc.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Well, you didn’t provide all the details. Maybe you can check the
PgPostGISSupportSuite
, which is a full and working case.Glad to hear that! You’re welcome! 😃