• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Toplink 10.1.3.5.0, Recovering from inserting duplicity

 
Jiri Nejedly
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I got a part of old project and I am learning a little bit of Toplink/ADF.

Please, can somebody explain me this?:
I am attempting to insert duplicit line into database. Unique index doesn't allow me to do that.
I am not able to get rid of duplicity exception. I still want to continue with unit of work



Thanks
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
revertAndResume() should clear any new objects.

What is your complete code? Do you have another object that is referencing the new object? I may still have the reference and be triggering the insert.

There should be no point to calling commitAndResume() for revert, as there should be no changes.

Normally when an error occurs, and new unit of work should be acquired for any further changes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic