mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
CoreStore.fetchOne.where not working with Date #250
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 @Piranit on GitHub (Jan 4, 2019).
Point model have field
@NSManaged public var captured: Date
when I try
let points: [Point] = CoreStore.fetchAll(From<Point>()) // get all pointspoints array have many points fetched from database
let point = CoreStore.fetchOne(From<Point>().where(\.captured == points[0].captured))I receive nil
but why?
how correctly get record by date?
pls, help me
@JohnEstropia commented on GitHub (Jan 8, 2019):
How are you saving your
Pointinstances?@Piranit commented on GitHub (Jan 8, 2019):
@JohnEstropia
@JohnEstropia commented on GitHub (Jan 15, 2019):
Are you sure
CoreStore.fetchOne(_:)is being called afterCoreStore.perform(synchronous:)?Have you tried to use
CoreStore.fetchAll(_:)instead to see if thePointis in the database at all?