types - Scala: Generic Method -
i can not find solution problem:
this trait:
trait basicrepository[schema <: table[entity] identifiable[entity], entity]
and this:
trait profilepartrepository[schema <: table[entity] profilepart[entity], entity]
this object:
object phonenumberrepository extends basicrepository[phonenumbers, phonenumber] profilepartrepository[phonenumbers, phonenumber] {
and method:
def insertprofilepart[schema <: table[entity] identifiable[entity], entity](repository: basicrepository[schema, entity], entities: seq[entity]) : seq[future[int]]
the method not compile. think can see achieve. signature have like?
edit: not care "schema" in method, has valid basicrepository.
edit2: compilation error (when calling method, agnosticdriver.api being slick.driver.jdbcdriver):
inferred type arguments [persistence.slickschemas.phonenumbers,product serializable] not conform method insertprofilepart's type parameter bounds [schema <: persistence.agnosticdriver.api.table[entity] persistence.slickschemas.identifiable[entity],entity]
so comments. stupid read think easy failures.
i passed wrong arguments "insertprofilepart" ...
Comments
Post a Comment