DAO of Maps

4 views
Skip to first unread message

Pat Ferrel

unread,
Dec 26, 2017, 10:27:29 AM12/26/17
to scala-salat
The docs say I can have a DAO that stores Maps as long as the key is a String. the following fails, anyone know why?

// model = sum of converted jouney weighted vectors
case class NavHintsDAO(navHints: MongoCollection) extends SalatDAO[Map[String, Double], String](navHints)
...
val navHintsDAO: NavHintsDAO = NavHintsDAO(connection(engineId)("nav_hints"))

This pattern works fine if the thing stored is a case class. I suppose I can store elements then create a map by reading all of them but suspect this would be highly inefficient.

Noah Zucker

unread,
Dec 26, 2017, 12:29:07 PM12/26/17
to scala-salat
See other thread on this topic.
Reply all
Reply to author
Forward
0 new messages