Hi Bob,

On 28/12/09, Robert Monaghan <b...@gluetools.com> wrote:

Is it possible to share a DataModel and resulting db file between 2 apps?
If so, what sort of pitfalls are present?

I want to create an App that creates the DB file, and a plugin for another App, 
that reads the database file.

I have 5 machines sharing the same database and DataModel. I alpha test by running two instances of the same app on a single machine. SQLite handles both cases without issue.

Keep in mind that Core Data implements a cache, reading from the database as little as possible. When one app changes data, your other app won't know about it until it forces a database refresh with the appropriate stalenessInterval.

Also note that a fetch doesn't refresh related objects, although it will fetch new related objects.

Regarding the earlier replies about locking, I actually do get (useful) optimistic locking errors if the machines disagree when they save. Maybe that's something else?

Ben Trumbull has vast knowledge of the inner workings of database refresh. You'll benefit if he notices your post.

Cheers,

Steve

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to