Hello
I got CrossTableLinkTarget exception in migration.
When I try to data with `migration.deleteData(forType: “AModel”)``````
I use several realm files
and AModel is used for only one realmfile.
The description of the issue a bit vague - a Realm Migration is for one file only so not sure how having several Realm files plays into that.
The error CrossTableLinkTarget
I believe is thrown if you’re trying to a create a Realm but don’t have permission to do so. Never actually seen that error but per the documentation
// Thrown by functions that require a table to not be the target of link
// columns, unless those link columns are part of the table itself.
I think it can also happen if you try to reference a property on that same property. e.g. perhaps a query on a person object where @“name.name == %@”, “Jay” where name is a String. One of the reasons using type-safe syntax is important. May not be the case here but just sayin’
Do you have a small reproducible example of the code that throws the error and perhaps a model you can share?
In my case, CrossTableLInkTarker error was thrown when I trying delete data of Type
That type will be removed newest schemaversion, so I tried to delete unused data.
migration.deleteData(forType: “AModel”)
I will try to make reproducible example and then I will reply example code
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
I cannot even get the c driver to build | 1 | 448 | Jun 2024 |
Please explain upsert of relations | 2 | 543 | Jun 2024 |
Enable ASLR for lib/arm64-v8a/libapp.so to Mitigate Security Risk | 0 | 243 | Jul 2024 |
Realm actors blocking each other | 1 | 297 | Jul 2024 |
React native + expo: UserProvider FallBack doesn’t render to screen | 1 | 257 | Aug 2024 |