osx - Core Data entity name equivalence -


i have hierarchical entities named {foo, fooa, foob, etc}. when creating new entity object method insertnewobjectforentityforname:, tried following:

#define namefoo @"foo" #define namefooa @"fooa"  [nsentitydescription insertnewobjectforentityforname:[namefoo stringbyappendingstring:@"a"] inmanagedobjectcontext:context]; 

even though [namefooa isequaltostring:[namefoo stringbyappendingstring:@"a"]] returns yes, runtime error entity not found. using namefooa work, hoping re-use code. there way make work?


Comments

Popular posts from this blog

c# SetCompatibleTextRenderingDefault must be called before the first -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -

c++ - Fill runtime data at compile time with templates -