I'm using NSBatchInsertRequest
to save an array of data to Core Data and the model has an attribute id
which is of type UUID
. when I attempt to execute the batch insert I get id is not valid
error, however when I change the type of id
to String
everything works fine.
It might worth mentioning that, when I try to save the array one by one without using NSBatchInsertRequest
, id
being UUID
is not an issue.
I was wondering whether it's a known issue or I'm missing something?
Appreciate any guidance!
Edit I:
As mentioned in the comment section NSBatchInsertRequest
works directly with SQlite and according to this question it is better to save UUID
as String