--To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/h_ny0XrNBewJ.
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
[error] /home/alex/work/scala/todo/app/models/Task.scala:14: not found: type ObjectId
[error] class Task(@ObjectId @Id val id: String,
Alexandre,I've tried this and found the following code works for me:
import org.codehaus.jackson.annotate.JsonPropertyimport reflect.BeanPropertyimport net.vz.mongodb.jackson.ObjectId
case class Task(@ObjectId @Id id: String,
Just a Fyi. Salat does support polymorphic objects through type hints - just like Jackson JSON.
In fact, I found Salat to be more reliable than Jackson because it doesn't suffer from the compile bug https://issues.scala-lang.org/browse/SI-5165.
Don't worry about mongo support in Play2, I think there should be a lot of tools around it...
PascalOn Fri, Mar 16, 2012 at 7:27 PM, Thibault Lacroux <ryk...@gmail.com> wrote:
Great, I was waiting for it before move on Play2.
Le vendredi 16 mars 2012 12:32:38 UTC+1, jroper a écrit :
I'm pleased to announce a new MongoDB module for Play 2.0. This
module uses the mongo-jackson-mapper:
http://vznet.github.com/mongo-jackson-mapper
which uses Jackson annotations to map Java/Scala objects to/from
MongoDB documents. The module is actually incredibly simple, it makes
no attempt to integrate with the Play ORM frameworks because they are
really not a good match for working with a document database. All the
module does is provide a simple way to configure how to connect to
MongoDB, and get a JacksonDBCollection, configured ready to use with
Scala or Java objects, and managed by the Play application, it's up to
the user to decide how they want to use this.
The project can be found here:
https://github.com/vznet/play-mongo-jackson-mapper
and I've just released and deployed version 1.0.0-rc.1 to sonatype,
which within an hour or two should be synced to the central maven
repository.
I've only been using play 2.0 this week, and there's no documentation
anywhere about how to write a play 2.0 module, so everything I've done
I've worked out from reading the play 2.0 source code. If someone who
knows something wants to take a brief look over my plugin (it's only 1
file) to see if everything looks ok, I'd greatly appreciate it.
--To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/h_ny0XrNBewJ.
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
You received this message because you are subscribed to a topic in the Google Groups "play-framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/K7IrXyXvL8w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/f43db62d-1a96-4524-bcbb-93edd2cef21e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi James
I have developed a demo ODM that use java async driver .
https://github.com/raimdtu/PlayAsyncJavaMongoODM
It will give you overview.
It has some initial work .