brightdigit / DataThespian

Concurrency-Friendly SwiftData
MIT License
11 stars 0 forks source link

Understand Model with Regarding to Saving #7

Closed leogdion closed 1 month ago

leogdion commented 1 month ago

See https://fatbobman.com/en/posts/nsmanagedobjectid-and-persistentidentifier/

leogdion commented 1 month ago
Creating DatabaseMonitor
NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed
Registering contentView
Registration Count 1
SetCompleted contentView F5AE5E4A-9205-43D7-B5FC-62A06F04F0A4
Updated Subscriptions for contentView from 0 by 1 to 1 F5AE5E4A-9205-43D7-B5FC-62A06F04F0A4
▿ Optional(SwiftData.PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata://C22067D2-9C64-4412-8A30-16F2E3081D89/Item/p18), implementation: SwiftData.PersistentIdentifierImplementation))
  ▿ some: SwiftData.PersistentIdentifier
    ▿ id: SwiftData.PersistentIdentifier.ID
      ▿ url: x-coredata://C22067D2-9C64-4412-8A30-16F2E3081D89/Item/p18
        - _url: x-coredata://C22067D2-9C64-4412-8A30-16F2E3081D89/Item/p18 #0
          - super: NSObject
        - _parseInfo: nil
        - _baseParseInfo: nil
    ▿ implementation: SwiftData.PersistentIdentifierImplementation #1
      ▿ storeIdentifier: Optional("C22067D2-9C64-4412-8A30-16F2E3081D89")
        - some: "C22067D2-9C64-4412-8A30-16F2E3081D89"
      - isTemporary: false
      ▿ URIRepresentation: x-coredata://C22067D2-9C64-4412-8A30-16F2E3081D89/Item/p18
        - _url: x-coredata://C22067D2-9C64-4412-8A30-16F2E3081D89/Item/p18 #0
        - _parseInfo: nil
        - _baseParseInfo: nil
      - primaryKey: "p18"
      - entityName: "Item"
Notifying of Update
Notifying contentView
Notification Complete
▿ SwiftData.PersistentIdentifier
  ▿ id: SwiftData.PersistentIdentifier.ID
    ▿ url: x-swiftdata://Item/5098A963-78DC-4C21-BA05-329484D9C25B
      - _url: x-swiftdata://Item/5098A963-78DC-4C21-BA05-329484D9C25B #0
        - super: NSObject
      - _parseInfo: nil
      - _baseParseInfo: nil
  ▿ implementation: SwiftData.PersistentIdentifierImplementation #1
    - storeIdentifier: nil
    - isTemporary: true
    ▿ URIRepresentation: x-swiftdata://Item/5098A963-78DC-4C21-BA05-329484D9C25B
      - _url: x-swiftdata://Item/5098A963-78DC-4C21-BA05-329484D9C25B #0
      - _parseInfo: nil
      - _baseParseInfo: nil
    - primaryKey: "5098A963-78DC-4C21-BA05-329484D9C25B"
    - entityName: "Item"
Notifying of Update
Notifying contentView
Notification Complete