Comments (4)
Hello @ransomweaver
There was something wrong in the Wiki. The fetch command should be:
let idents: [IdentityProxy]? = IdentityProxy.by("cloudUUID", equalTo: "someuuid").find() as [IdentityProxy]?
Could you try it?, I've updated it on the Wiki
Thanks for the report
from sugarrecord.
That works, sort of. If I pass a String var to equalTo: I get this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "cloudUUID == 4457f4fe-aad5-4a1c-9109-9b5376b0acef"'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a0f9f35 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010b79ebb7 objc_exception_throw + 45
2 Foundation 0x0000000109a7b3ed _qfqp2_performParsing + 8495
3 Foundation 0x0000000109a79256 +[NSPredicate predicateWithFormat:arguments:] + 46
4 libswiftFoundation.dylib 0x000000010c17811a _TFE10FoundationCSo11NSPredicateCfMS0_Ft6formatSSGSaPSs11CVarArgType___GSqS0 + 378
5 SRRealm 0x000000010ba992d5 TFC7SRRealm17SugarRecordFinder12setPredicatefS0_FT5byKeySS8andValueSS_S0 + 869
6 SRRealm 0x000000010baa050a TFE7SRRealmCSo9RLMObject2byfMS0_FTSS7equalToSS_CS_17SugarRecordFinder + 266
7 MyApp 0x00000001099868c9 TFFC11MyApp8AppState9syncCardsFS0_FPSs9AnyObject_T_U_FP7SRRealm18SugarRecordContext_T + 3145
8 SRRealm 0x000000010baa608e TFFC7SRRealm11SugarRecord9operationFMS0_FT12inBackgroundSb9stackTypeOS_20SugarRecordStackType7closureFT7contextPS_18SugarRecordContext__T__T_U_FT_T + 270
9 SRRealm 0x000000010ba9b217 TTRXFo__dT__XFdCb__dT + 39
10 libdispatch.dylib 0x000000010cff6ba6 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x000000010d0147f4 _dispatch_client_callout + 8
12 libdispatch.dylib 0x000000010cfff15d _dispatch_root_queue_drain + 1097
13 libdispatch.dylib 0x000000010d000612 _dispatch_worker_thread2 + 52
14 libsystem_pthread.dylib 0x000000010d3acef8 _pthread_wqthread + 314
15 libsystem_pthread.dylib 0x000000010d3affb9 start_wqthread + 13
To fix that I have to double-quote the string like this:
var idents: [IdentityProxy]? = IdentityProxy("cloudUUID", equalTo: "\"\(identUUID!)\"").find() as [IdentityProxy]?
That doesn't seem right to have to do that.
from sugarrecord.
Assigning high priority to fix it @ransomweaver , let you know when it's ready
from sugarrecord.
@ransomweaver take a look here
https://github.com/SugarRecord/SugarRecord/blob/develop/example/SugarRecordExample/Shared/Controllers/RealmTableViewController.swift#L46
In that example we fetch Realm models from the database and it's working properly.
from sugarrecord.
Related Issues (20)
- Realm update objects HOT 1
- NSManagedObjects subclass with a different class name HOT 1
- There's no example project for CoreData+iCloud and document is wrong HOT 1
- realm-cocoa 1.1.0 fails on xcode8.3 with redefinition of module 'Realm' HOT 2
- Replace Context with NSManagedObjectContext
- Cartfile still requires realm-cocoa 1.1.0 which doesn't build against Swift 3.1 HOT 3
- Carthage 'realm-cocoa' build fails HOT 4
- "Serious application error" when CoreDataObservable used
- The update operation doesn't work
- CoreDataObservable always returning index=0 on changes HOT 2
- Is it possible to delete all data (for example when user logs out) of core data? Not the models but data in the models HOT 1
- Add support for RequestObservable in MacOS 10.12+
- Brainstorming SugarRecord 4
- pod install on Example project fails
- Development Pods / Frameworks Support
- iOS Carthage build fails with Swift 4.1
- Can you adapter Swift 4.1
- Taking CoreData operations off main thread
- App Crashes when using observable HOT 1
- how to update an record ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sugarrecord.