Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting actual database column name  RSS feed

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!