Is there any orm-like library for mongodb in scala?

半腔热情 提交于 2019-12-03 06:29:17

There are two solid options:

Salat, which is designed to integrate with Casbah using case classes and scalasig - https://github.com/novus/salat/

Lift (liftweb.net) also has an activerecord ttype library for Mongo which Foursquare has built a DSL, Rogue, for. http://engineering.foursquare.com/2011/01/21/rogue-a-type-safe-scala-dsl-for-querying-mongodb/

Spring Data is releasing Morphia-like mapping capabilities in the M2 of the MongoDB support. We've talked about doing some native Scala support for this but we haven't had anyone ask for it directly, so its hard to gauge interest. It should be usable as-is from Scala--though there are things I'd like to see us make more Scala-ish.

https://github.com/springsource/spring-data-document

I don't want to use morphia in scala because I have to convert java collections to scala

If this is the only reason, I suggest you to use scala.collection.JavaConversions It contains implicit conversions from Java to Scalca collections and vice verse.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!