project-imas / encrypted-core-data

v2.0 - iOS Core Data encrypted SQLite store using SQLCipher
Other
785 stars 236 forks source link

Transient properties had column created and fetched #257

Open Chm opened 7 years ago

Chm commented 7 years ago

Properties of transient type had columns created during create-table but not during upgrade. How ever values were always fetched.

lolgear commented 7 years ago

After upgrading to pod to latest commit ( 4ca0977e9e0b610e6813886276bb7bbd9406335f ), I catch errors:

2016-11-23T18:13:32+03:00 | ❗️Error | Error: no such column: entity.createdAtDate

createdAtDate is transient column.

Chm commented 7 years ago

accesses to transient columns should have been filtered by ManagedObjectContext at upper level. A sample project and iOS version you are targeting would be helpful.

lolgear commented 7 years ago

@Chm I use transient properties in NSPredicate +predicateWithFormat: factory method.

NSFetchedResultsController can't use this predicate. Error above appears:

2016-11-23T18:13:32+03:00 | ❗️Error | Error: no such column: entity.createdAtDate

createdAtDate is transient column.

iOS 10.1.1 Any project that uses transients in NSPredicate.

Chm commented 7 years ago

NSPredicate works with NSManagedObjects, and would not fire exceptions for database level changes. This issue looks more like that string in predicate did not match with the parsed object.

lolgear commented 7 years ago

@Chm, No, PR hides all transient properties. Commenting something.transient fix my issue. Please, make revert PR.