• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with naming strategy

 
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the naming convention in my organization is like so tableName_columnNameIn, so for example, table "Country", will have columns like these : country_id, country_code, county_name.
but in my class, Country class' fields are id, code and name.
Is there a way to implement this kind of naming strategy. The problem is, how do I access class name when modifying column name?
thanks
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mapping between table's columns and Class fields is done is mapping files. So no need to access class name is anything changes. Just update the mapping files.
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but naming strategy provides us the means to change all mapping from one place. If we do this via mapping files, then that would mean we need to modify 100 files if we have 100 objects. Correct me if I'm wrong. Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic