Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting actual database column name

 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, I would like to audit on a particular field using an Audit class for which I need to send actual column name to it from my current class.

In this class, I am using property names of the classes thru getter/setter methods.

Hence how can I get the actual column name thru program?

pramodh
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why do you need the column names for that ?


if you want to stiore audit information, then take a look at hibernat intercepter and the hibernate event mechanism introduced in H3.

pascal
 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that is the business requirements, we have already a table for audit which is used by other systems as well. We need to use the same. It required actual column name for it. Hence I would like to know how we can get the actual DB column name from teh mapping file.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!