Persistence by Reachabillity and tracking events

Thread is closed for posting
2 posts, 0 answers
  1. Pål
    Pål avatar
    53 posts
    Member since:
    Sep 2012

    Posted 12 Jan 2010 Link to this post

    Hi.

    OA supports peristence by reachabillity, such that if I call context.Add(obj1), and another object obj2 is referencenced from obj1, then obj2 is also added to the context.

    My problem is that when using tracking, only one call is made to Tracking.Added event for obj1 and not for obj2.

    To get around the problem, I have implemented IInstanceCallbacks interface and manually raising a custom event, but this is possible only after transaction is commited.

    Is it possible to get a list of referenced new objects after the call to context.Add(obj1) somehow?

    I assume that some logic is made when transaction is commited to retrieve these newly added objects, and so is it possible to retrieve these before the transaction is commited?

    Thanks,

    Pål
  2. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 15 Jan 2010 Link to this post

    Hi Pål,

    The only way to rise the Adding event for your referenced object (obj2) is to add it to the object scope as well. Unfortunately there is no other workaround at this moment. We are sorry for any inconvenience this might be causing.

    Regards,
    Petar
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top