开发者

Core Data: Fetched attributes with joined tables

开发者 https://www.devze.com 2023-01-23 18:01 出处:网络
I have a Host which has a many-to-many relationship with services. The relation is through a join table \"hostServices\". I would like to fetch te services related to a Host via a \"fetched property\"

I have a Host which has a many-to-many relationship with services. The relation is through a join table "hostServices". I would like to fetch te services related to a Host via a "fetched property". But how do I define the predicate?

I now did something like 'ANY hostServices.host.name == 开发者_C百科"$FETCH_SOURCE.name"' and I have tried 'ANY hostServices.host == "$FETCH_SOURCE"'.

But that didn't work. Does anyone know how I could fetch the services?

Thanks in advance!

My data model


Try:

host == $FETCH_SOURCE
0

精彩评论

暂无评论...
验证码 换一张
取 消