Uploaded image for project: 'Hibernate OGM'
  1. OGM-612

Error when entity has ObjectID and Embeddable in MongoDB

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 4.1.0.Beta7
    • Fix versions: 4.1.0.Beta8
    • Components: zzz_datastore
    • Labels:
      None

      Description

      From the forum:

      If I use the new ID-feature with MongoDB (ObjectId) like this:

          @Id
          @GeneratedValue(strategy = GenerationType.IDENTITY)
          private ObjectId id;
      
          @Embedded
          private SomeEmbeddable details;
      

      Then storing the entity causes the following exception:

      java.lang.IllegalArgumentException: Document field names can't have a . in them. (Bad Key: 'details.endDate')
      

        Attachments

          Activity

            People

            • Assignee:
              davided Davide D'Alto
              Reporter:
              davided Davide D'Alto
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: