NSPredicate和KVC收集运营商

时间:2016-04-22 03:55:17

标签: core-data nspredicate key-value-coding

假设我有一个Core DataEmployer,其中有一个叫做员工的1-N关系。

employees关系映射到NSSet。到目前为止一切都很好。

我想创建NSFetchRequest Employeremployees > 0,其谓词要求"employees.@count"

如何创建此谓词?

我尝试了import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf object simpleSpark { def main(args : Arrayt[String]){ val logfile = "C:\\spark-1.6.1-bin-hadoop2.6\spark-1.6.1-bin-hadoop2.6\README.md" val conf = new SparkConf().setAppName("Simple Application").setMaster("local[2]").set("spark.executor.memory", "1g") val sc = new SparkContext(conf) val logData = sc.textFile(logFile, 2).cache() val numHadoops = logData.filter(line => line.contains("Hadoop")).count() val numSparks = logData.filer(line => line.contains("Spark")).count() println("Lines with Hadoop: %s, Lines with Spark: %s".format(numHadoops, numHadoops)) } } ,但它似乎认为整个事情都是一个keyPath。

1 个答案:

答案 0 :(得分:1)

你的语法倒退了:

@count.employees