Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reuse of unique keys in cacha situation.

 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if during deletion, I choose to set the uniqueKey to recNo delete;

would I reuse the uniqukey instantly on my next creation.

would it cause any problem?
 
Sean Keane
Ranch Hand
Posts: 582
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
People have reused deleted record numbers, you should be aware of this from the plenty of threads about it, just search . Is not clear that reusing deleted record numbers would not cause a problem when implemented correctly?
 
Roel De Nijs
Sheriff
Posts: 10392
133
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I reused deleted record numbers, did not have any issue with it. But if you don't feel comfortable with it, just don't do it. It's not a must requirement, so you are not required too.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Ixus!

I too chose to reuse deleted entries.

Ixus See wrote:if during deletion, I choose to set the uniqueKey to recNo delete;


Champ, I don't get... what is this uniqueKey that you talk about?
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roberto Perillo wrote:Howdy, Ixus!

I too chose to reuse deleted entries.

Ixus See wrote:if during deletion, I choose to set the uniqueKey to recNo delete;


Champ, I don't get... what is this uniqueKey that you talk about?


next usable key = recNo
 
Sean Keane
Ranch Hand
Posts: 582
Chrome Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ixus See wrote:next usable key = recNo


You should try leave coding to your .java files and use correctly structured English when writing in forums - make an effort . As the saying goes "you get what you give" - if you put in very little effort with writing your posts then you shouldn't expect people to put much effort into reading or replying to them.

Similarly with problems you are trying to solve, if you don't put much effort into solving them yourself then you shouldn't expect others to either.
 
Roel De Nijs
Sheriff
Posts: 10392
133
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sean Keane wrote:You should try leave coding to your .java files and use correctly structured English when writing in forums - make an effort . As the saying goes "you get what you give" - if you put in very little effort with writing your posts then you shouldn't expect people to put much effort into reading or replying to them.

Similarly with problems you are trying to solve, if you don't put much effort into solving them yourself then you shouldn't expect others to either.

I completely agree, couldn't have said it better (also because my English is not that good ) It totally deserves +1
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic