• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re: refreshObject doesn't seem to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: refreshObject doesn't seem to work


  • Subject: re: refreshObject doesn't seem to work
  • From: Ben Trumbull <email@hidden>
  • Date: Wed, 8 Oct 2008 13:31:22 -0700

Steve,

We use Core Data for a multi-user, multi-machine point-of-sale
system in a bicycle shop.  When someone sells a bike on one
machine the other machines don't immediately see it.

How is this configured ? Through distributed notifications replicating changes, or a network file system mount ? If the later, is it AFP ? If not, that's a problem.


I've 'enhanced' refreshObject to, among other things, temporarily ignore the staleness interval:

Uhm, okay. The merge policy only affects saving. It's for conflict resolution. Refreshing either never merges (like rollback) or always merges (like byPropertyObjectTrump) depending on the flag parameter.


My refresh process:

1.  re-fetch all the relevant managedObjects (arrayController fetch)
2.  call the above refreshObject on all of today's sales, every
bike-mold (a sort of bike template) and every bike

That should be enough on its own. In step 1, do you fetch the related objects as well ?


I get optimistic locking errors on the first try at the above
process but not on subsequent tries.  I thought doing
refreshObject would avoid optimistic locking errors but it
appears not which experiments with detectConflictsForObject confirm.

We only generate optimistic locking errors on save, so I'm not sure what this means.


- Ben

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • re: refreshObject doesn't seem to work
      • From: Steve Steinitz <email@hidden>
  • Prev by Date: re: NSUndoManager f@*#ing up Core Data database
  • Next by Date: Re: Core Data: Copying and pasting chained entities
  • Previous by thread: refreshObject doesn't seem to work
  • Next by thread: re: refreshObject doesn't seem to work
  • Index(es):
    • Date
    • Thread