mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
Identifiable <=> UniqueIDType mapping / interaction #331
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IdoRabin on GitHub (Jun 2, 2020).
Considering the introduction of
identifiableis swiftone can imagine an extension for
ImportableUniqueObjectleveraging situations whereImportSource is Identifiable, usingImportSource.IDin relation toUniqueIDType,uniqueIDKeyPathanduniqueIDValueI've implemented a crude base class for a DBTable, but am sure one can create a much better thingie as an extension to the
ImportableUniqueObjectprotocol..@JohnEstropia commented on GitHub (Jun 3, 2020):
@IdoRabin I'm sorry, did you have any question or was there something not working for you?
If you were asking how to do this, you'll have to declare:
somewhere in your codebase.
@JohnEstropia commented on GitHub (Jun 3, 2020):
Also to add, CoreStore intentionally does not implement
Identifiableby default as it is a use-case dependent semantic.For example, you are free to use multiple properties as the ID:
@IdoRabin commented on GitHub (Sep 25, 2020):
thanks.