2

I am currently struggling with this issue here..

In our system, we use Java beans and Scala case classes, and they often contains one another. So, i am looking for a good solution for how to map these objects to mongoObjects, so i can save/load them from the database.

For this, i tried Morphia, but unfortunately it won't serialize back from json to object because it cannot construct a case class.

So I tried Salat, but this one only works with case classes and not java beans :(

Do anyone have an idea about how to do this?

Nadav Leshem
  • 193
  • 9

1 Answers1

1

Salat developer here.

If you want to use Salat, you could convert your Java beans to Scala case classes and annotate the constructor params with @scala.reflect.BeanProperty for interoperability with Java (if this is really necessary).

prasinous
  • 798
  • 3
  • 6