Quote:
I would like to change the attribute name (in java code, or with the anotation columnname ), and
change only the name of the column on database automatically, of course, with the same data.
Is that possible?
No, at least not automatically.
As I'm informed Hibernate does't provide automatic schema migrations.
There exists property
hibernate.hbm2ddl.auto = update
but this is still experimental and not recommended for production use.
What you can do, is launching your hibernate with property:
hibernate.hbm2ddl.auto drop,create
This will erase and rebuild your schema on database, so the old column "name" dissapperas.
But obviously in this way you will lost all data.