• Post Reply Bookmark Topic Watch Topic
  • New Topic

NX:Question about reuse a record

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the instruction, DBMain interface has a method create(String [] criteria), it's used to create a new record, possibly reuse a deleted one, I don't understand the last sentence "possibly reuse a deleted one" how to achieve that?
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to iterate through the records returning the first one that has been deleted. In the event that there are no deleted records to return, then append the new record at the end.
-- George
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!