• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with naming strategy

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • 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
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic