Toplink "update" descriptor event firing on deletion

I've got a class for which I've defined actions for the pre-update, pre-insert, and post-delete descriptor events. Strangely, I see that when deleting an instance of this class, my pre-update action is called before the deletion is performed, then my post-delete action is called.
The ordering makes sense, but I'm wondering why the pre-update event fires at all? When viewing the resulting SQL (by turning on logging), I only see a DELETE statement.
Any thoughts?
Mark S

I assume this happens when you do a straight delete, and that you aren't updating the object before it gets deleted (i.e., sometimes a UOW will modify an object and then some part of the use case deletes it before the UOW commits).
In any case, I'm sure this was a concious decision and it's the kind of thing you don't want to change because no doubt there are people depending on it behaving that way :)
If it's turning into a headache (i.e., maybe you do a lot of expensive ops in the event), you might want to experiement with a couple things (I'm just thinking out loud here, not sure if this is a wild goose chase) --
Try unregistering the object. I.e., if you explicitly do a deleteObject, I think you can unregister the object in the UOW and then the delete will still happen (you might have to tell the UOW to performDeletesFirst though). This definitely won't work if the object is being deleted by de-associating a private relationship though, only if you explicitly call delete...
- Don

Similar Messages

  • Disable event firing while updating list item in custom timer job

    Hi
    I am adding new items in the list usign custom timer job.
    While adding the items in the list event receiver of another list (which is not related to list which is updating) is getiing fired due to which I am getting data wrongly updated and exceptions are comming.
    why the another lists event recevier is executing while updating my list?
    How can I disable event firing from timer job code?
    please suggest any solution

    Hello,
    It seems you have deployed your event receiver globally and it is applied to all the lists. I can suggest two ways:
    1. Either you update your event receiver feature.xml file and attached to specific list, wherever you want. You can follow below link to attach event with specific list via code:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverdefinition.aspx
    Or instead of code you can also pass ListUrl in feature.xml file:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    2. OR delete event receiver from the list: You can use below code in your timer job to delete event receiver
    http://sarangasl.blogspot.in/2009/11/remove-event-receiver-in-sharepoint.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to Disable Event firing while updating a list item using poweshell

    Hi All,
    I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed.
    However event receivers gets fired which is now a problem. I want to disable the Event receivers before update and enable it after update. I want powershell code for this. I am using SharePoint 2010.
    Your help would be much appreciated. Thank you in anticipation.
    Regards
    Karthik R.

    hi
    check this thread:
    How to disable event firing outside an event. It contains example on C#, but it is not difficult to convert it to PowerShell.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • [svn:osmf:] 11159: Updating unit test with a check to all expected events firing properly.

    Revision: 11159
    Author:   [email protected]
    Date:     2009-10-26 12:12:10 -0700 (Mon, 26 Oct 2009)
    Log Message:
    Updating unit test with a check to all expected events firing properly.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkIntegrationTest/org/osmf/content/TestContentElementInt egration.as

    camickr wrote:
    Do you really expect us to read all that code to try and understand what you are attempting to do?
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html
    Absolutely not, I wouldn't post such a large amount of code expecting people to read it. I indicated that I believe my error only lies within one of two classes, and that I highlighted the two methods with comments.
    I was told to create an SSCCE as you have mentioned, but I believe all of this code is necessary for the program to run properly, so I only provided it all for compilation purposes.
    I'll check the examples posted, and if I need to I'll see if I can change my methods to use the swing timer class as the first reply mentions, but I did not think this would be necessary.
    Edited by: Drew___ on Nov 29, 2007 3:28 AM
    I have just figured out what my problem was, sorry it was quite a simple mistake. When checking for user input, I was immediately resetting the eventFlag or something afterwards. This meant the object would stop moving as it couldn't remember my last keypress. Thanks for your help, those tutorials are really good.

  • Item added & item updated events fired twice.

    Hello everyone, 
    I have item added and item updated events and both sends e-mails twice cos they are fired twice. 
    I tried the below method but the problem still continues. Any suggessions?
    base.EventFiringEnabled=false;
    base.EventFiringEnabled=true;
    note: my list is custom list. (not document lib)

    If you have required checkout enabled the events can be triggered twice. See this post for more information and how to bypass it:
    Managing ItemUpdating and ItemUpdated Events Firing Twice in a SharePoint Item Event Receiver

  • Event Fired when a mxml component is shown on screen

    hello,
    I have following application structure nested up to 2/3 level.
    Application
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    mxml componet in turn has similar structure
    componet
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    and end component is form which is shown and actions performed
    I want to execute specific code when the form is first time shown
    which will collect data from server and will show for further actions.
    User will edit/delete/update data with various button clicks.
    I tried activate event on end component but it seems that it wont get
    fired at all. End components are enclosed in BorderContainer or Group.
    To test activate event I have used Alert.show only but popup is not shown
    when I select link button on penutimate linkbar.
    If I am doing something wrong please let me know as well please
    guide me which event shall I use so that whenever linkbutton is
    pressed on linkbar it will fire that event. In that event I can check
    whether it has been called earlier by checking some variable which
    will be null in creation complete and set in event fired when linkbutton is pressed.
    Thanks and regards
    Raja

    I think 'creationComplete' is the closest event to what you are looking for.

  • ICal sends multiple emails for invites and updates to event attendees - HELP!

    Every time I create or send an event in iCal, it sends multiple emails to each attendee (2-3 duplicate emails) with the same event.  So if I have 3 event invitees, they get 3 emails each.  All the emails are sent from the correct account in Apple Mail, and the calendar itself shows only one email address for each attendee, but for some reason the sent folder shows that each person was emailed 2-3 times.  This is causing quite a problem for work, as any invite I send is clogging up inboxes with duplicate and triplicates for each attendee. 
    When I send a meeting acceptance, it only sends one reply, so I have no idea why it's duplicating or triplicating events when new ones are sent out or udpated by me.  I can't delete my calendar without losing important events from clients or what not, so I'm not sure what to do.
    Also notable:
    I am NOT using iCloud calendars as I needed to create a calendar group and iCloud didn't support that.
    My calendar is syncing to an FTP so that people in my main office can view and download my calendar as needed.
    I am on a brand new (not even 2 mos old) MacBook Pro Retina 2013 model, with OS X 10.8.3
    I am on Calendar 6.0
    I can't change/update events on my calendar from one sub-calendar to another once they are created (though I can edit on my iPhone and resync). This is really annoying and I've posted about this before to no avail (thread here: https://discussions.apple.com/message/21646850#21646850 and here: https://discussions.apple.com/thread/3920017?start=0&tstart=0).
    For now (for this thread) I'd like any help possible in getting my calendar to send just ONE email to meeting attendees when I create and/or update an event.
    Thanks!

    I have the same issue.  Did you get a resolution to this?  Whenever I add a new person to the meeting invite iCal always resends the entire invite...it should just send the invite to newly added participants.

  • The server is failing to download some updates. Event ID 10032 (ran out of disk space & extended volume, still got error)

    On Friday, 9/17 @ 7 am, after deselecting Windows 2003 in products, I ran Server Cleanup Wizard (as well as sqlcmd -I -i"WsusDBMaintenance.sql" -S "np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query"), and 0 bytes were freed which I thought
    odd.   I then selected Windows Server 2012 R2 and Office 2013 since we're going to be using those. 
    After this, on 9/19 @ 7:30am, the server had the message:      Event 364 Content file download failed. Reason: There is not enough space on the disk.    Source File: /d/msdownload/update/software/secu/2014/04/coreservermui-it-it_ebb7e1e8d487b90ffd719f06122a3db947b3f949.cab
    Destination File: e:\WSUS\WsusContent\49\EBB7E1E8D487B90FFD719F06122A3DB947B3F949.cab.
    At some time during the day on 9/19, our SAN admin increased the volume (all server's volumes are on a SAN) from the SAN end, and I extended it in Disk Mngmt on the WSUS server.   I went home for the weekend
    I came back today (9/22), saw I had gotten the "the server is failing to download some updates. Event ID 10032"   on Saturday 9/20 @ 1:30am.   I checked the volume \WSUScontent is on (the volume we extended) and it has
    17GB free. So I assume space should not still be an issue.
    The same 10032 error had occurred on 9/19, at 1:30 pm, but I assume it was before my colleague and I bumped up the disk space.  But why it occurred again the next day I'm not sure.
    However, since the 10032 error on 9/20 @ 1:30am, it has not reoccured, and no yellow or red event messages.  So possibly all is well now.  Could it have been that WSUS was being sluggish to recognize the increased disk space, even though Windows
    itself recognized it?  

    Thanks Lawrence, I went through the steps you instruct on (which I did not know about, so I greatly appreciate that!), and freed up over 30GB of space.
    Outstanding! :-)
    But your steps don't really address deleting all (solely) 2003 updates.
    Correct. First, because you cannot DELETE updates, unless they are expired or old revisions, and use the Server Cleanup Wizard to do that.
    Second, because the article was about removing *unneeded* updates. It does not consider the scenario where a product category is being retired
    When I go to my "2003" update view, sorting by Any Except Declined, and Status Any, I still see tons of 2003 ones, some solely for it, others that apply to 2003 and other OSs. I want to leave the latter, but delete the ones solely for
    2003. Not just superseded ones, but ALL that are solely for 2003.
    You cannot delete updates. You can DECLINE updates, if that's what you want to do.
    So let's talk a minute about these updates that might be applicable to operating systems other than Windows Server 2003. Let's be practical about the other operating systems listed. If you look closely, I suspect you will discover that those "other
    operating systems" are either Windows XP or Windows 2000, but nothing else. Do updates for Windows XP or Windows 2000 really matter to you? I suspect not.
    The reason I highly suspect this is because the practice of building packages targeted at multiple operating systems was terminated when Windows Vista was released (actually I think it happened with the release of WSUS v3, but this is just a matter of trivia,
    the relevant point is that it's not done anymore, and has not been done for many years).
    Ergo, I know for a fact, that NONE of the updates applicable for Windows Server 2003, will be applicable for any newer operating system. Ergo, it probably doesn't matter at all, so just SelectAll -> Decline if that's what you want to do.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • First event fired to event structure

    Hi all,
       Does anyone know what's the first event being fired to the event structure on VI startup? I set a breakpoint on the event structure and it breaks. However i wasn't able to capture whats the event.
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    It something like the OnLoad event.
    Another way out is to register an user event, and have this event fired during application startup. But i wonder if anyone has a better way?
    Many thanks!

    j3r3mi wrote:
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    Why don't you show us some code.
    Are the IO name static for the duration of the program? Are you using a regular table column or the "row header strings []" property for the IO names?
    If you want to write the row headers at the start of the program, place the code before the main loop containing the event structure. No event case needed. If you have a specific event to update the table headers if needed, fire the event once at startup using a signaling value property, again with the property node placed before the main loop.
    LabVIEW Champion . Do more with less code and in less time .

  • Event firing multiple times (et_Got_Focus)

    Hi,
    I just noticed while debugging my Add On code that the et_Got_Focus event which I have added to my event filters is triggered 64 times when I change a field value and then move to a different field.  This not only happens in the matrix when changing field values and tabbing through but also in the header fields.
    This has got to be a bug and it is not only slowing down the A/P Invoice form but it is potentially very dangerous to have an event firing 64 times when it should only be fired once. 
    To test this all one needs to do is add the et_Got_Focus event to the event filter with the A/P Invoice form, then add a debug statement to write out the itemvalue properties and you will see once you edit a value and tab you will get 64 statements that are the et_Got_Focus event, BeforeAction false for the same field or column when it should only occur once.
    I have a very digrunted client that is very frustrated due to the amount this slows down data entry in the A/P Invoice.  I cannot get rid of this event because there is a particular field I am monitoring for the got focus event so I can stop it under certain circumstances.
    If anyone else has experienced this or knows how to resolve this please let me know.  I guess if I don't find out why this is happening I will post a CSN to SAP.
    Thanks very much,
    David Wall
    Here is a sample of my debug output messages for one update of a single field and then tabbing out:
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False

    Hi David,
    We at Self Informatique France have the same problem of getfocus firing many times at one of our customers in Algeria although wae are not using formated search.Any solution ?
    Best Rgds.
    Antoine Egeileh
    President
    Self Informatique
    [email protected]

  • When I sync my iPod to my MacBook through iTunes new events do not show up and old events are not deleted. I am using Snow Leopard  and not iSync.

    I am using Snow Leopard on a MacBook. I have an iPod touch 3G. I do not use iSync it Mobile Me. When I sync my iPod through iTunes new events on my iPod do not show up on my Mac and old events do not delete. I have read help instructions that include deleting the data on the iPod. The iPod has the correct data and the Mac does not so I have not followed those instructions. I need help as the only reason I bought the Mac was to be able to sync, back up, view and print my calendar. Currently it is useless. If only Apple could have learned from the elegance of the Palm software.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • I updated to iOS7 and my deleted photos came back.  How do I make sure this doesn't happen again?

    I updated to iOS7 and my deleted photos came back.  How do I make sure this doesn't happen again?  I want to get rid of the ones I already got rid of, but if they just keep coming back that will be a waste of time. 
    Can anyone help?
    When I sync with itunes, the photos sections says I am syncing with my iphone, so I assume that anything I physically delete from my iphone should not be showing up again.  Right?
    Thanks in advance.
    CM
    PS- I don't use iphoto. 

    Is that really how sync works?
    If you read this, http://support.apple.com/kb/ht4236  and this http://support.apple.com/kb/TS1314  they don't actually make how sync works very clear.  I had thought that syncing my device to itunes would allow I tunes to copy what was currently on my phone so that I could restore that information when needed ie if your phone dies and you need to do a clean install of the iOS system, you always have what is currently on your phone saved in Itunes.
    Specifically reading this:
    To delete Camera Roll photos and videos from your device
    There are two methods to delete items from the Camera Roll:
    Import the Camera Roll to your computer and choose to delete items after import.
    Delete photos and videos from your device manually:
    Open the Photos application and open the Camera Roll.
    Tap the Action button.
    Tap each photo to select it.
    Tap the Delete button.
    Note: For photos and videos you want to save, import them to your computer before deleting them from the Camera Roll.
    What you seem to be saying is that iTunes saves every contact, message, photo etc and when you click sync, it reuploads things that you deleted?  This seems like it should work the opposite.  Make a mirror image of my iPhone on my computer, not make a mirror image of my computer onto my iPhone.  You delete things for a reason. 
    Help- anyone else?  Is razmee209 right?

  • HELP!  I tunes wouldn't update so I tried to delete and reinstall.  I keep getting a message stating the installation source for this product is not available.  Verify that the source exists and that you can access it.  please help!!

    Help!  Itunes wouldn't update so I tried to delet and reinstall.  I keep getting a message: The instillation source for this product is not available.  Verify that the source exists and that you can access it.  I also get this message:  The feature you are trying to use is on a network resource that is unavailable.  Click OK to try again, or enter an alternate path to a folder containing the installation package 'iTunes64.msi' in the box below.  Help I have no idea what that means or how to fix it. 

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page). Here's a screenshot showing the particular links on the page that you should be clicking:
    After clicking one of the circled links, you should be taken to another page, and after a few seconds you should see a download dialog appear for the msicuu2.exe file. Here's a screenshot of what it looks like for me in Firefox:
    Choose to Save the file. If the dialog box does not appear for you, click the link on the page that says "CLICK HERE IF IT DOES NOT". Here's a screenshot of the page with the relevant link circled:
    When the dialog appears, choose to save the file.
    (2) Go to the Downloads area for your Web browser. Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Cannot delete the Folder on the desktop after Mavericks update. when I try to delete it, it is asking for logon password, When I give the logon password, it plays a sound of moving to Trash, but the folder still remains on the desktop

    Cannot delete the Folder on the desktop after Mavericks update. when I try to delete it, it is asking for logon password, When I give the logon password, it plays a sound of moving to Trash, but the folder still remains on the desktop
    Please help

    It is a folder which I have created. Name is "SAP".
    I copied some of my office stuff and then deleted the contents inside the folder. But I couldnt delete the folder SAP.
    This is happening after the Mavericks update.

  • I recently update my iTunes and it deleted all my songs. I was able to get some back via iCloud but I can't seem to sync my old playlist. Any suggestions??

    I recently update my iTunes and it deleted all my songs. I was able to get some back via iCloud but I can't seem to sync my old playlist. Any suggestions??

    See Empty/corrupt library after upgrade/crash...
    tt2

Maybe you are looking for

  • Spam filter for email server

    Depends on what you want to pay. There are various ways of doing this. 1. block at your firewall. I have a watchguard and this acts as my first line of defense. 2. Install an app on your mail server - I have Symantic for Exchange as my second line  b

  • Jittery video playback

    I'm not sure where to post this, but I'll try here. Hope someone can help. Lately I've been having issues with stuttering, jittery playback of video materials whether it's on Vimeo, Youtube, full episodes of television shows, HD videos, whatever. Non

  • Strange behavior with TabNavigator code ...

    Hi, In my code I use a Tab Navigator and it works OK; yet if I want to use an Alert in Tab (0) ONLY I get that every other Tab is now opening with the same Alert as well ??? Does anybody have a fix for that ! Thanks in advance regards aktell2007     

  • Get report info

    hi,, In forms we can "get_application_property(FORM_NAME)" Is there a similar function in Reports 6i(c/s) Or some other way that we could "get" the "Report name" (eg. MY_REP) dynamically in Reports using some sort of function or something... Thanks,

  • Infotype creation in R3 system

    Hi, Hi can anybody tell me how to create a infotype in R3 system.