title: Persisting to SQL Server 2008 using stored procedures, JPA and Hibernate
body: <p>We are implementing a web page to maintain an organisational structure. The structure is stored in SQL Server 2008 and uses the new HierarchyID data type. Because we have had problems getting JPA and Hibernate to play with this new data type we have decided to use views and stored procedures to abstract away this data type. So we want to use a stored procedure to persist our entities but how you do this with JPA is unclear.</p>
  
  <p>Firstly, are we taking the correct approach and secondly, is it possible to use stored procedures to persist entities annotated with JPA?</p>