iphone - programmatically create new table with ios-core data -


can core data allow me create new table programmatically? or if need need use sqlite directly.

thanks

from coredata perspective, don't create new tables because database tables 1 possible type of persistence store associated core data model.

you can, however, create new core data entities programatically using nsentitydescription class. in nsentitydescription class documentation find this:

entity descriptions editable until used object graph manager. allows create or modify them dynamically. however, once description used  (when managed object model belongs associated persistent store coordinator), must not (indeed cannot) changed. enforced @ runtime: attempt mutate model or of sub-objects after model associated  persistent store coordinator causes exception thrown. if need modify model in use, create copy, modify copy, , discard objects old model. 

i've never tried modify 1 @ runtime, i'm not sure how works when have existing sqlite persistence store, if @ all. it's worth playing around nsentitydescription see if gets close trying do.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -