title: Hibernate. How to map own class as type of property in entity?
body: <p>How  to map with Hibernate my own class as type of property in other class? For example I have class <strong>Address</strong> and class <strong>User</strong>. And I try to map as following:</p>
  
  <pre><code>public class User {
      private Long id;
      private Address address;
      // other fields
  }
  </code></pre>
  
  <p>But I get the exception in this case:</p>
  
  <pre><code>org.hibernate.MappingException: Could not determine type for: es.myproject.entity.User
  </code></pre>
  
  <p>I would be grateful for any guidance or useful links on the respective samples. Preferably using Hibernate annotations. Thanks in advance!</p>