Compound primary keys
See original GitHub issueRealm 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
Issue Analytics
- State:
- Created 8 years ago
- Reactions:58
- Comments:50 (7 by maintainers)
Top Results From Across the Web
Composite Key in SQL - GeeksforGeeks
Now a composite key is also a primary key, but the difference is that it is made by the combination of more than...
Read more >How can I define a composite primary key in SQL?
A primary key consists of one or more columns (from that table). ... consists of two or more columns it is called a...
Read more >How to Create MySQL Composite Primary Keys Simplified 101?
Each entry in a table is uniquely identified by the PRIMARY KEY constraint. Primary keys must have UNIQUE values and should not have...
Read more >SQL COMPOSITE KEY - javatpoint
Composite key is a key which is the combination of more than one field or column of a given table. It may be...
Read more >Composite key - Wikipedia
In database design, a composite key is a candidate key that consists of two or more attributes (table columns) that together uniquely identify...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 million
+1