project-imas / encrypted-core-data

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

Fix bug with sibling entities that contain relationships to each other. #210

Closed nfox513 closed 8 years ago

nfox513 commented 8 years ago

Modify SubEntitiesModel to exhibit this behavior.

nfox513 commented 8 years ago

I believe this will fix the same issue pull request 185 tries to fix.

For some more background, I have a model where all classes inherit from a shared abstract entity. When saving, a JOIN attempted to join the same table with itself (since each entity had the same root entity), which gave a could not prepare statement log message from sqlcipher.