[baseten-users] NSArray/NSDictionary

Tuukka Norri tuukka.norri at karppinen.fi
Wed Dec 16 17:20:22 EET 2009


Hi!

Michael Ruepp kirjoitti 15.12.2009 kello 14.28:
> how is the best method to get the whole attributes and values of a BXDatabaseObject as Dictionary?
You would have iterate the corresponding entity's properties (see -[BXDatabaseObject entity]) and call -valueForKey: or -primitiveValueForKey: for each of them. 

> And, how do I create a int2vector datatype to store NSArrays?
Int2Vector is used in some PostgreSQL's system catalogs. If you want to store a collection, use a to-many relationship or a PostgreSQL array instead. Unfortunately the array data types cannot be created using Xcode's data modeler, but in case you write the creation statements by hand, BaseTen will create NSArrays for you when fetching.
-- 
Best regards,
Tuukka Norri
MK&C





More information about the baseten-users mailing list