title: Is it possible to inject spring data jpa repository into java persistent entity?
body: <p>Is it possible to inject spring data jpa repository into java entity (using hibernate to declare POJO as persistent entity)?</p>
  
  <p>I have Person java entity model like this.</p>
  
  <pre><code>@Entity
  @Table(name="PERSON")
  public class Person implements Serializable {
      @Id
      @Column(name="PERSON_ID",nullable=false)
      private UUID personId;
      ...
  </code></pre>
  
  <p>Here is spring data jpa repository:</p>
  
  <pre><code>public interface PersonRepository extends JpaRepository&lt;Person,UUID&gt; {
      @Query("from Person where Person.id = ?1")
      Person findPersonById(UUID id);
  </code></pre>