Uploaded image for project: 'Realm Java SDK'
  1. Realm Java SDK
  2. RJAVA-22

Compound primary keys

      Realm should also support composite primary keys. Reusing the @PrimaryKey annotation should be relatively simple.

      public class CompositeKeyObj extends RealmObject {
      
        @PrimaryKey
        private int compositePartOne;
      
        @PrimaryKey
        private int compositePartTwo;
      }
      

      Primary keys are currently implemented in the binding. This should be implemented at the core level: https://github.com/realm/realm-core/issues/831

            Assignee:
            Unassigned Unassigned
            Reporter:
            christian.melchior@mongodb.com Christian Melchior (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: