MongoDB Plugin
  1. MongoDB Plugin
  2. GPMONGODB-105

Another unique id generation in domain class

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      There is a situation we need to keep one more unique id in our domain class - besides the standard id - which is of type ObjectId, we need to keep another unique id - which type should be either integer or long.

      It would be great if there was a mapping for that. I assume using the atomic increment possibility of mongo should be used to implement that.

      Thanks in advance.

      Regards,
      Nune

        Activity

        Hide
        Lauri Piispanen added a comment -
        Show
        Lauri Piispanen added a comment - Or you can maybe use java.util.UUID? http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html
        Hide
        Nune added a comment -

        we have actually looked into it, but the problem was we needed int or long. it was needed for migration from mysql database to mongo, and we needed to have unique identifier in number in mongo.

        Show
        Nune added a comment - we have actually looked into it, but the problem was we needed int or long. it was needed for migration from mysql database to mongo, and we needed to have unique identifier in number in mongo.

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Nune
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: