Skip to content

Commit dccafa2

Browse files
authored
[RKOTLIN-1084] Remove deprecated property RealmClass.isEmbedded (#1754)
1 parent f2f1c87 commit dccafa2

File tree

22 files changed

+38
-133
lines changed

22 files changed

+38
-133
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ This release will bump the Realm file format 24. Opening a file with an older fo
77
* Removed property `RealmLog.level`. Log levels can be set with `RealmLog.setLevel`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038))
88
* Removed `LogConfiguration`. Log levels and custom loggers can be set with `RealmLog`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038))
99
* Removed deprecated `io.realm.kotlin.types.ObjectId`. Use `org.mongodb.kbson.BsonObjectId` or its type alias `org.mongodb.kbson.ObjectId` instead. (Issue [#1749](https://github.com/realm/realm-kotlin/issues/1749) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1082))
10+
* Removed deprecated `RealmClass.isEmbedded`. Class embeddeness can be check with `RealmClassKind.EMBEDDED`. (Issue [#1753](https://github.com/realm/realm-kotlin/issues/1753) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1080))
1011
* [Sync] Removed deprecated methods `User.identity` and `User.provider`, user identities can be accessed with the already existing `User.identities`. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083))
1112
* [Sync] `App.allUsers` does no longer return a map, but only a list of users known locally. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083))
13+
* [Sync ]Removed deprecated `DiscardUnsyncedChangesStrategy.onError`. (Issue [#1755](https://github.com/realm/realm-kotlin/issues/1755) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1085))
1214

1315
### Enhancements
1416
* Support for RealmLists and RealmDictionaries in `RealmAny`. (Issue [#1434](https://github.com/realm/realm-kotlin/issues/1434))
@@ -18,6 +20,7 @@ This release will bump the Realm file format 24. Opening a file with an older fo
1820
### Fixed
1921
* Inserting the same typed link to the same key in a dictionary more than once would incorrectly create multiple backlinks to the object. This did not appear to cause any crashes later, but would have affecting explicit backlink count queries (eg: `...@links.@count`) and possibly notifications (Core Issue [realm/realm-core#7676](https://github.com/realm/realm-core/issues/7676) since v1.16.0).
2022
* [Sync] Automatic client reset recovery would crash when recovering AddInteger instructions on a Mixed property if its type was changed to non-integer (Core issue [realm/realm-core#7683](https://github.com/realm/realm-core/pull/7683), since v0.11.0).
23+
* [Sync] Typos [SubscriptionSetState.SUPERSEDED], [SyncTimeoutOptions.pingKeepalivePeriod] and [SyncTimeoutOptions.pongKeepalivePeriod]. (Issue [#1754](https://github.com/realm/realm-kotlin/pull/1754)
2124

2225
### Compatibility
2326
* File format: Generates Realms with file format v24 (reads and upgrades file format v10 or later).

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/ext/RealmAnyExt.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public fun realmAnyListOf(vararg values: Any?): RealmAny =
7171

7272
/**
7373
* Create a [RealmAny] containing a [RealmDictionary] with all argument values wrapped as
74-
* [RealmAnys]s.
74+
* [RealmAny]s.
7575
* @param values entries of the dictionary.
7676
*
7777
* See [RealmAny.create] for [RealmDictionaries] constraints and examples of usage.

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/internal/RealmMapInternal.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ internal class ManagedRealmDictionary<V> constructor(
797797
}
798798

799799
override fun changeFlow(scope: ProducerScope<MapChange<String, V>>): ChangeFlow<ManagedRealmMap<String, V>, MapChange<String, V>> =
800-
RealmDictonaryChangeFlow<V>(scope)
800+
RealmDictionaryChangeFlow<V>(scope)
801801

802802
override fun thaw(liveRealm: RealmReference): ManagedRealmDictionary<V>? {
803803
return RealmInterop.realm_dictionary_resolve_in(nativePointer, liveRealm.dbPointer)
@@ -820,7 +820,7 @@ internal class ManagedRealmDictionary<V> constructor(
820820
// TODO add equals and hashCode when https://github.com/realm/realm-kotlin/issues/1097 is fixed
821821
}
822822

823-
internal class RealmDictonaryChangeFlow<V>(scope: ProducerScope<MapChange<String, V>>) :
823+
internal class RealmDictionaryChangeFlow<V>(scope: ProducerScope<MapChange<String, V>>) :
824824
ChangeFlow<ManagedRealmMap<String, V>, MapChange<String, V>>(scope) {
825825
override fun initial(frozenRef: ManagedRealmMap<String, V>): MapChange<String, V> =
826826
InitialDictionaryImpl(frozenRef)

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/internal/query/ScalarQuery.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ internal abstract class BaseScalarQuery<E : BaseRealmObject> constructor(
8181
}
8282

8383
/**
84-
* Returns how many objects there are. The result is devliered as a [Long].
84+
* Returns how many objects there are. The result is delivered as a [Long].
8585
*/
8686
internal class CountQuery<E : BaseRealmObject> constructor(
8787
realmReference: RealmReference,

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/internal/schema/RealmClassImpl.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public data class RealmClassImpl(
3939
it.type.run { this is ValuePropertyType && isPrimaryKey }
4040
}
4141

42-
override val isEmbedded: Boolean = cinteropClass.isEmbedded
43-
4442
override val kind: RealmClassKind
4543
get() = when {
4644
cinteropClass.isEmbedded -> RealmClassKind.EMBEDDED

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/query/RealmElementQuery.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public interface RealmElementQuery<T : BaseRealmObject> : Deleteable {
3636
* Finds all objects that fulfill the query conditions and returns them in a blocking fashion.
3737
*
3838
* It is not recommended launching heavy queries from the UI thread as it may result in a drop
39-
* of frames or even ANRs. Use [asFlow] to obtain results of such queries asynchroneously instead.
39+
* of frames or even ANRs. Use [asFlow] to obtain results of such queries asynchronously instead.
4040
*
4141
* @return a [RealmResults] instance containing matching objects. If no objects match the
4242
* condition, an instance with zero objects is returned.

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/query/RealmScalarQuery.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface RealmScalarQuery<T> {
3333
* - `[sum]` returns the `type` specified in the call to said function
3434
*
3535
* It is not recommended launching heavy queries from the UI thread as it may result in a drop
36-
* of frames or even ANRs. Use [asFlow] to obtain results of such queries asynchroneously instead.
36+
* of frames or even ANRs. Use [asFlow] to obtain results of such queries asynchronously instead.
3737
*
3838
* @return a [T] containing the result of the scalar query.
3939
*/

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/query/RealmSingleQuery.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface RealmSingleQuery<T : BaseRealmObject> : Deleteable {
3232
* fashion.
3333
*
3434
* It is not recommended launching heavy queries from the UI thread as it may result in a drop
35-
* of frames or even ANRs. Use [asFlow] to obtain results of such queries asynchroneously instead.
35+
* of frames or even ANRs. Use [asFlow] to obtain results of such queries asynchronously instead.
3636
*
3737
* @return a [RealmObject] or [EmbeddedRealmObject] instance or `null` if no object matches the condition.
3838
*/

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/schema/RealmClass.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ public interface RealmClass {
3636
*/
3737
public val primaryKey: RealmProperty?
3838

39-
/**
40-
* Returns whether or not the class is embedded.
41-
*/
42-
@Deprecated("This property has been deprecated.", ReplaceWith("kind == RealmClassKind.EMBEDDED", "io.realm.kotlin.schema.RealmClassKind"))
43-
public val isEmbedded: Boolean
44-
4539
/**
4640
* Returns what type of Realm model class this is.
4741
*/

packages/library-base/src/commonMain/kotlin/io/realm/kotlin/types/RealmAny.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ import kotlin.reflect.KClass
8787
* `RealmAny` can contain other [RealmList] and [RealmDictionary] of [RealmAny]. This means that
8888
* you can build nested collections inside a `RealmAny`-field.
8989
* ```
90-
* realmObjct.realmAnyField = realmAnyListOf(
90+
* realmObject.realmAnyField = realmAnyListOf(
9191
* // Primitive values can be added in collections
9292
* 1,
9393
* // Lists and dictionaries can contain other nested collection types
@@ -400,7 +400,7 @@ public interface RealmAny {
400400
* ),
401401
* realmDictionaryOf(
402402
* "key1" to realmListOf(),
403-
* "key2" to realmDictioneryOf())
403+
* "key2" to realmDictionaryOf())
404404
* )
405405
* ```
406406
*/
@@ -413,7 +413,7 @@ public interface RealmAny {
413413
* To create a [RealmAny] containing a [RealmDictionary] of arbitrary values wrapped in
414414
* [RealmAny]s use the [io.realm.kotlin.ext.realmAnyDictionaryOf].
415415
*
416-
* A `RealmDictionery<RealmAny?>` can contain all [RealmAny] types, also other collection types:
416+
* A `RealmDictionary<RealmAny?>` can contain all [RealmAny] types, also other collection types:
417417
* ```
418418
* class SampleObject() : RealmObject {
419419
* val realmAnyField: RealmAny? = null
@@ -422,7 +422,7 @@ public interface RealmAny {
422422
*
423423
* // Dictionaries can contain other collections, but only `RealmList<RealmAny>` and
424424
* // `RealmDictionary<RealmAny>`.
425-
* realmObjct.realmAnyField = realmAnyDictionaryOf(
425+
* realmObject.realmAnyField = realmAnyDictionaryOf(
426426
* "int" to 5,
427427
* // Lists and dictionaries can contain other nested collection types
428428
* "list" to realmListOf(

0 commit comments

Comments
 (0)