Announcement Announcement Module
Collapse
No announcement yet.
Spring Data MongoDB - Code type mapping Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data MongoDB - Code type mapping

    Spring Data doesnt seem to map the Code data type correctly, it seems to store Code as a string which cant be executed using db.eval().

    For example:

    Code code = new Code( "function( x , y ){ return x + y + 1; }" );
    mongoOperations.insert( code, "system.js" );


    yields:

    > db.system.js.find({});
    { "_id" : ObjectId("50a5e289031b7dd3335c3d7f"), "_class" : "org.bson.types.Code", "_code" : "function( x , y ){ return x + y + 1; }" }
    >


    am i missing something here?
Working...
X