You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Throw if model contains a dictionary field until we add support for it
1450
-
if (containsDictionary(metadata.fields)) {
1451
-
emitStatement("throw new UnsupportedOperationException(\"Calls to 'insert' with RealmModels containing RealmDictionary properties are not supported yet.\")")
1452
-
endMethod()
1453
-
emitEmptyLine()
1454
-
return@apply
1455
-
}
1456
-
1457
1449
// Throw if model contains a set field until we add support for it
1458
1450
if (containsSet(metadata.fields)) {
1459
1451
emitStatement("throw new UnsupportedOperationException(\"Calls to 'insert' with RealmModels containing RealmSet properties are not supported yet.\")")
@@ -1565,9 +1557,72 @@ class RealmProxyClassGenerator(private val processingEnvironment: ProcessingEnvi
1565
1557
endControlFlow()
1566
1558
endControlFlow()
1567
1559
}
1568
-
Utils.isRealmDictionary(field) -> {
1569
-
// TODO: dictionary
1570
-
emitSingleLineComment("TODO: Dictionary")
1560
+
Utils.isRealmValueDictionary(field) -> {
1561
+
val genericType =Utils.getGenericTypeQualifiedName(field)
1562
+
val elementTypeMirror =TypeMirrors.getRealmDictionaryElementTypeMirror(field)
emitStatement("""throw new IllegalArgumentException("Embedded objects can only have one parent pointing to them. This object was already copied, so another object is pointing to it: cache${fieldName}.toString()")""")
0 commit comments