title: how to get name of the column of an attribute?
body: <p>I was tasked with creating a log in my job, but they said I should follow their concept of log, not the usual one that is the mere comparison of two objects, they want me to insert into a table a line with a 'id_table', a 'id_column', a 'before_value', and an 'after_value', to make this process dynamically I'll need to create a method that will receive a column_name, return an id_column and insert it along with the other values into the database, the question is, is there a simple way to get the column name of an attribute of a class ? something like "example.getIdExample().getColumnName()" ? 
  Thanks in advance !</p>