Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deleting records

 
Pallav Grigo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a question about deleting records..when the user deletes a record..the default setting is to change the flag from LIVE_RECORDS to DELETED_RECORD..is this ok?..i mean say you want to add another record with same primary key(flight no)..then the find method does not check for deleted records..wouldn't that mean that 2 records with same primary key are in the database but only was activated?..any comments?? :roll:
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only LIVE records are read by the readRecord() method. This method is used when you do the search and also when you add a new record.
In other words, you can add a LIVE record with the same primary key even though the table has another DELETED record with the same primary key.
Also the find method will not bring any records which are DELETED.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you guys have the older version of the test that requires you to make a conversion program, this test is over a year old.
But if you guys aren't doing the old version, then you don't need to worry about adding or deleting records. It is not a requirement.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic