开发者

SQLitePersistent objects only loading NSNumber fields, everything else left null

I've used SQLitePersistentObjects for a lot of different iPhone projects and haven't yet encountered this issue. I'm not sure if it's a bug or merely an issue on my part.

I have a model with quite a few fields in it. Here are the fields enumerated as they exist in the sqlite database:

SELECT pk,sender_i_d,read,target,web_u_r_l,sender_type,client_type,thread_i_d,replied_to_i_d,direct_to_i_d,message_i_d,group_i_d,u_r_l,target_i_d,created_at,network_p_k,body_parsed,message_type,attachment_p_ks,body_plain FROM message

When I create the models, all fields are properly serialized to disk. The models work fine as long as they exist in memory. However, when I re-launch the application, all fields are not loaded into the model, anything with a TEXT sqlite field is left null.

If I use the sqlite3 console I can success开发者_JS百科fully select data from the models, the data is all there.

Has anyone else had this issue with SQLitePersistentObjects, or sqlite3? Am I using some bizarre reserved word in sqlite3?


For any SQLitePersistentObject users that may happen upon this in the future, here is a lesson :

Don't use properties that start with a capital letter! SQLitePersistentObjects will probably puke!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜