score:1

Accepted answer

you can define a type alias just to shorten class names:

type dbo = mongodbobject

or in a similar way rename a class on import:

import com.mongodb.casbah.commons.{mongodbobject => dbo}

i don't like these solutions much. a better thing to do would be to use rogue. it not just reads better, it's actually much more typesafe. the only downside is that you have to define your db classes first before you can query, but once you do, your query would look like:

pages.where(_.id gt new objectid(pageid)).orderasc(_.id).limit(1)

or something like that :).

check here for more examples.


Related Query

More Query from same tag