This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How should I protect default values, by id or add another attribute to the tables?  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my java application one region, one team, and 8 user roles are required as defaults. They can be renamed (and should be renamed by the sys admin) or disabled, but shouldn't be deleted. I want to protect them from deletion. Should I used their uuid id value from the database or should I add another attribute such as isDefault, true or false to those default regions, teams, users? What is the best practice?

Thanks
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

jason thompson wrote:In my java application one region, one team, and 8 user roles are required as defaults.


jason,

This is basically the same question you asked in your other thread isn't it? Except that now you've introduced things like "region" and "team" which mean absolutely nothing to us.

Did you read my answer in your other thread? I'm tempted to close this one, but won't just yet...

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!