title: Getting all mapped Entities from EntityManager
body: <p>I have a piece of maintenance code that should grant select privileges to a certain user at certain points of time:</p>
  
  <pre><code>grant select on A_DB.A_TABLE to READ_ONLY_USER;
  </code></pre>
  
  <p>I want to do this for all tables. I could use <code>select * from tab</code> in Oracle or <code>show tables</code> in MySQL to get the complete list and then move on like that.</p>
  
  <p>But since I already have the <code>javax.persistence.EntityManager</code> Object at hand, I wondered if there is another way to get at all the mapped Entities, the Manager knows about (I am using Hibernate under the hood).</p>