title: Hibernate: Query Metadata
body: <p>I'm currently working on a solution to automatically generate ExtJS forms based on 
  a hibernate mapping (I use hibernate reverse engineering for that based on @Annotations).</p>
  
  <p>Hibernate has a </p>
  
  <pre><code>getPropertiesInterator() 
  </code></pre>
  
  <p><a href="http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/mapping/PersistentClass.html#getPropertyIterator%28%29" rel="nofollow">http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/mapping/PersistentClass.html#getPropertyIterator%28%29</a></p>
  
  <p>funciton for that. Which is accessible like this</p>
  
  <pre><code>((LocalSessionFactoryBean)sessionFactory).getConfiguration().getClassMapping(&lt;Classname&gt;.class.getName())
  </code></pre>
  
  <p>Which lists the properties of the table. I use this information to generate ExtJS inputs out of it</p>
  
  <p>varchar => input
  text    => textarea
  etc.</p>
  
  <p>My question is, if there is maybe another (maybe better) way to get this information out of my hibernate configuration?</p>
  
  <p>Regards</p>
  
  <p>JS</p>