In my Hibernate + Spring application, I have several annotation based domain objects. I would like to go through all of them and create metatable with definitions for all of them. This metatable should look like this:
Entity Name | Field Name | Field Type | Field Size| etc.
For example,
@Entity
public class User {
@Column(name = "username", length = 255)
private String username;
@Column(name = "password", length = 255)
private String password;
}
should create two records
Entity Name | Field Name | Field Type | Field Size|
User | username | String | 255 |
User | password | String | 255 |
How can be this done?
P.S. We are using Spring's LocalContainerEntityManagerFactoryBean for data access