title: Is it possible to map JPA entity to stored procedure (function)?
body: <p>I need to map JPA entity to Postgres function which returns table. 
  So each time when I query for this entity, it will automatically invoke this function. Is it possible?
  Maybe @NamedNativeQuery can help?</p>
  
  <p>Something like <a href="https://stackoverflow.com/questions/26122796/how-to-properly-call-postgresql-functions-stored-procedures-within-spring-hibe">this</a> maybe?</p>