mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-13 12:50:34 +01:00
Merge pull request #421 from xquezme/develop
Fix compound indexes for dynamic models
This commit is contained in:
@@ -197,7 +197,7 @@ class DynamicModelTests: BaseTestDataTestCase {
|
||||
modelVersion: "V1",
|
||||
entities: [
|
||||
Entity<Animal>("Animal"),
|
||||
Entity<Dog>("Dog"),
|
||||
Entity<Dog>("Dog", indexes: [[\Dog.$nickname, \Dog.$age]]),
|
||||
Entity<Person>("Person")
|
||||
],
|
||||
versionLock: [
|
||||
|
||||
@@ -585,7 +585,7 @@ public final class CoreStoreSchema: DynamicSchema {
|
||||
entityDescription.indexes = entity.indexes.map { (compoundIndexes) in
|
||||
|
||||
return NSFetchIndexDescription.init(
|
||||
name: "_CoreStoreSchema_indexes_\(entityDescription.name!)_\(compoundIndexes.joined(separator: "-"))",
|
||||
name: "_CoreStoreSchema_indexes_\(entityDescription.name!)_\(compoundIndexes.joined(separator: "_"))",
|
||||
elements: compoundIndexes.map { (keyPath) in
|
||||
|
||||
return NSFetchIndexElementDescription(
|
||||
|
||||
Reference in New Issue
Block a user