title: JPA entity field that is not mapping db column but is obtained by query
body: <p>I have 2 db tables: tree and leaf. It is obviously one to many relationship. I want to have a leavesCount field in the Tree entity - it should be not persisted (@Transient) but also obtained by query every time the entity is loaded into context. Is it possible to achieve?</p>
  
  <p>I know I could just make @OneToMany and get the collection's size but I'm really intrested in the query approach.</p>