Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic