Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object type '(null)' not managed by the Realm #5956

Closed
erychagov opened this issue Oct 17, 2018 · 1 comment
Closed

Object type '(null)' not managed by the Realm #5956

erychagov opened this issue Oct 17, 2018 · 1 comment

Comments

@erychagov
Copy link

Goals

I want to get filtering result using a query with SUBQUERY

Expected Results

I get filtered result

Actual Results

I get a crash when try to filter a result

*** Terminating app due to uncaught exception 'RLMException', reason: 'Object type '(null)' not managed by the Realm'
*** First throw call stack:
(0x184f32364 0x184178528 0x1048f79e4 0x1048d255c 0x1048d20fc 0x1047f4a2c 0x1047f2d88 0x1047f17b4 0x1048f5ce8 0x1048efc18 0x1048efb90 0x1052354a0 0x100d28010 0x100d29bb8 0x10090d80c 0x10090e57c 0x10090eb48 0x10090fb00 0x1045972c4 0x10459f72c 0x1045a0b68 0x1045a94b0 0x1045ba124 0x104590148 0x1066012cc 0x10660128c 0x106605ea0 0x184eda544 0x184ed8120 0x184df7e58 0x186ca4f84 0x18e47767c 0x1005e0834 0x18491456c)
libc++abi.dylib: terminating with uncaught exception of type NSException

Code Sample

I have next class

final class Contact: Object {
  ...
  let additionalCompanies = List<String>()
  ...
}

And I try to filter a result using the next code:

let res = realm.objects(Contact.self).filter("SUBQUERY(additionalCompanies,$element,$element.stringValue == %@).@count>0", "something")

I could make a mistake in the predicate, but the exception is strange of me in this case.

Version of Realm and Tooling

Realm (3.7.6)
RealmSwift (3.7.6)

Xcode 9.4.1
Build version 9F2000

ProductName: Mac OS X
ProductVersion: 10.13.6
BuildVersion: 17G65

pod: 1.5.3

@tgoyne
Copy link
Member

tgoyne commented Oct 17, 2018

@tgoyne tgoyne closed this as completed Oct 17, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants