I am currently building a e-commerce website using spring mvc4 hibernate4 and Mysql where the Admin should be able to dynamically add a column to a particular table when the application is already running and the server should not be restarted.For example if a new value is inserted in table 1 then a column should be created for it in table 2.
I think there can be no JPA/Hibernate solution for this, since your Entities map to your database schema and what you are trying to achieve is simultanously mutating your Entity's Class and the corresponding schema. You need to go with JDBC and plain SQL for this and use DDL statements.
I wonder what's your use case for this?