scala - Unspecified value parameters: dbConfigProvider: DatabaseConfigProvider -


in context of battling define simple plain sql dao using play , slick latest versions 2.4.x , 3.0.3 respectively. have following:

import javax.inject.inject import play.api.db.slick.{databaseconfigprovider, hasdatabaseconfigprovider} import slick.driver.jdbcprofile import slick.driver.postgresdriver.api._ import slick.lifted.tablequery  import models.tables._  class basedao @inject() (protected val dbconfigprovider: databaseconfigprovider) extends hasdatabaseconfigprovider[jdbcprofile] {   import driver.api._    val fundquery = tablequery[fund] }  object basedao extends basedao { /// <<<<<<<<<< error here    // empty } 

i error unspecified value parameters: dbconfigprovider: databaseconfigprovider on line object basedao ... , can't find how fix syntax use-case new me , there no similar definitions in examples etc.

your class defined constructor parameter:

class basedao @inject() (protected val dbconfigprovider: databaseconfigprovider) extends hasdatabaseconfigprovider[jdbcprofile] { ... }                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

so, error suggests, need provide instance of databaseconfigprovider when building object:

val mydatabaseconfigprovider: databaseconfigprovider = ...  object basedao extends basedao(mydatabaseconfigprovider) { ... } 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -