realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

Support uniqueness constraint

Open edmofro opened this issue 9 years ago • 8 comments

Realm does not support a 'unique' constraint (other than a maximum of 1 primary key per object type).

This is highly desirable.

I realise this is something lacking from Realm's core, and when https://github.com/realm/realm-java/issues/967 is resolved it will most likely propagate through to realm-js, but wanted to record it against this repo for others searching.

edmofro avatar May 05 '16 02:05 edmofro

+1

tbeech avatar Aug 31 '16 15:08 tbeech

I want to make field 'itemName' of Table Item to be unique in Android Realm. It means 'itemName' should not contain duplicate values. Is there any other way to achieve this except Primary key.. Thanks..

dtmandroid avatar Apr 08 '17 06:04 dtmandroid

@dtmandroid not at the moment, no. We will update this issue when we look into it.

kristiandupont avatar Apr 13 '17 09:04 kristiandupont

Any news on this?

SMhdAsadi avatar Mar 09 '22 11:03 SMhdAsadi

@SMhdAsadi

Unfortunately not. But I will raise the feature request with the Realm Core team (see also https://github.com/realm/realm-core/issues/3860).

kneth avatar Mar 10 '22 09:03 kneth

We Really Need this feature @realm-support

kwanLeeFrmVi avatar Oct 04 '23 04:10 kwanLeeFrmVi

@quanle1996 Ya, I need too

thienvu23 avatar Oct 04 '23 04:10 thienvu23

++

SaeedMuhaisen avatar Dec 06 '24 14:12 SaeedMuhaisen

+1 for this feature

johnitvn avatar Jul 23 '25 08:07 johnitvn