Created
March 26, 2014 00:03
-
-
Save milieu/9774177 to your computer and use it in GitHub Desktop.
Temp trait question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet in question | |
def auditTypesQuery: List[DetailTable] = { | |
for { | |
detail <- detailsComponent.DetailTables | |
} yield detail | |
}.list | |
// Simplified trait I'm making: | |
trait CSVImporter { self => | |
def detailsComponent: models.DetailTablesComponent | |
def auditTypesQuery = // ... same as above, gives this error: | |
// value map is not a member of object models.DetailTablesComponent#DetailTables | |
} | |
// Class that uses auditTypesQuery | |
@Singleton | |
class HierarchyCSVImporter @Inject() (dc: DatabaseComponent) extends CSVImporter with Results with Formats { | |
import database.Driver.simple._ | |
import database.Driver.simple.Database.threadLocalSession | |
val database = dc | |
def db = Database.forDataSource(DB.getDataSource()) | |
def detailsComponent: models.DetailTablesComponent = | |
new DetailTablesComponent(database) | |
def auditTypesQuery = // ... same as above, no errors | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment