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

MongoDB throws an exception when updating an entity that is an inner class

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0.Beta1
    • Fix Version/s: 4.1.3.Final
    • Component/s: zzz_datastore
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Suitable for new contributors:
      Yes, likely
    • Last commented by a user?:
      true
    • Sprint:

      Description

      MongoDB throws the exception because the table field contains a $ signed in the name.

      Caused by: com.mongodb.MongoException: cannot update reserved $ collection
      

      Example:

      @Entity
      @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
      public class CommunityMember {
      
      	@Id
      	public String name;
      ...
      	@Entity
      	public static class Employee extends CommunityMember {
      ...
      	}
      }
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: