Giter Club home page Giter Club logo

Comments (3)

rktoomey avatar rktoomey commented on July 25, 2024

Unfortunately, that's not enough information to guess what might be going on.

Try this more recent presentation, which had a github repo you can
clone and instructions on how to run sbt console and import what you
need:
http://repo.novus.com/mongonyc-salat/#0

On 30 July 2011 08:37, robb1e
[email protected]
wrote:

Hello, I'm using salat-core 0.0.7 and casbah 2.1.2 with Scala 2.8.1 and following the example here: http://repo.novus.com/salat-presentation/#16 I'm expecting the fieldname 'id' to be translated to '_id' but on the toDBObject call, it remains 'id', meaning a new key of '_id' is created by the database.

robb1e

Reply to this email directly or view it on GitHub:
https://github.com/novus/salat/issues/11

from salat.

robb1e avatar robb1e commented on July 25, 2024

Right, sorry. I was trying to use the @key annotation to translate the Mongo id '_id' to what I wanted it to be, 'id'. However in 0.0.7 the @key didn't seem to have an affect on the name, however I've just swapped to 0.0.8-SNAPSHOT as described in the presentation you've linked to and now the @key is working. I'm happy to stick with the snapshot for the time being.

Cheers

from salat.

rktoomey avatar rktoomey commented on July 25, 2024

It works in 0.0.7 as well, but I didn't have a similar code sample to
direct you to. You can look at the specs for the @key annotation in
the 0.0.7 tag.

On 30 July 2011 09:03, robb1e
[email protected]
wrote:

Right, sorry.  I was trying to use the @key annotation to translate the Mongo id '_id' to what I wanted it to be, 'id'.  However in 0.0.7 the @key didn't seem to have an affect on the name, however I've just swapped to 0.0.8-SNAPSHOT as described in the presentation you've linked to and now the @key is working.  I'm happy to stick with the snapshot for the time being.

Cheers

Reply to this email directly or view it on GitHub:
https://github.com/novus/salat/issues/11#issuecomment-1688063

from salat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.