• 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
“undelete”?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

“undelete”?


  • Subject: “undelete”?
  • From: OC <email@hidden>
  • Date: Mon, 21 Mar 2016 21:17:44 +0100

Hello there,

is there a trick to “undelete” an object in editing context?

Before saveChanges, I go through ec.deletedObjects(), and in some very special cases, I might find that an object should NOT be deleted. Just like it has never been added to deletedObjects at all.

I've tried to insertObject it immediately; that works all right for the object itself, but still removes its owned :1 relationships, which is also quite wrong.

Is there a way to do it right?

Note: if there was a way to mark specific objects as read-only (never to be deleted, never to be updated), it would be even better; but I've tried to override isReadOnly, and it does not seem to be even called from saveChanges. I can't make R/O the whole entity: it applies to only some of its objects. I can't throw from validateForDelete either: I don't want saveChanges to fail. I need it to work all right with all the other objects, just not deleting a couple of special ones (nor their owning relationships).

Thanks,
OC



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: “undelete”?
      • From: Klaus Berkling <email@hidden>
    • Re: “undelete”?
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Maven not copying java resources into jar file
  • Next by Date: Re: “undelete”?
  • Previous by thread: Re: Maven not copying java resources into jar file
  • Next by thread: Re: “undelete”?
  • Index(es):
    • Date
    • Thread