Relationship is equal to 0

Asked

Viewed 67 times

2

I’m new to core dating and I don’t know what’s going on. I have a many to many relationship between the entity News and Friends as shown below:inserir a descrição da imagem aqui

I created Nsmanagedobject Subclass but I didn’t change anything (I don’t know if this is essential for the relationship to work) and I also think it’s not necessary to popular this relationship since the two entities already have data. And I found that the relationship is empty using:

let predicateDenuncia = NSPredicate(format: "any amigos.amizade.@count == %d" , 0)

and also tried to :
let predicateDenuncia = NSPredicate(format: "any amigos.@count == %d" , 0)
That way I discovered my relationship is returning empty , someone there knows what might be going on? Thank you.

  • Puts the NSFetchRequest complete, will be easier to debug.

  • 1

    I was missing I popular the relationships with dice I had skipped this step rs but thanks for the help! thanks!

1 answer

0


I managed to solve this problem.... as I had never messed with relationships in Core Data did not know that I had to popular the relationship rs now it’s all going well !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.