title: Spring Data Rest Projections with or without explicit Declaration in Repository
body: <p>What is difference between creating a SDR Projection and then </p>
  
  <p>(i) Explicitly declaring that in corresponding Repository as in -</p>
  
  <pre><code>@RepositoryRestResource(excerptProjection = UserSummaryProjection.class)
  public interface UserRepository extends JpaRepository&lt;User, Integer&gt; { ..
  }
  </code></pre>
  
  <p>(ii) Not explicitly defining Projection in Repository </p>
  
  <p>What I find is that when Projection is explicitly declared in Repository , then that projection is shown for that entity wherever findAll or findByID gets called. </p>
  
  <p>But when it is not declared, then there is an option left to either user / not use them so, by default all fields get shown.</p>
  
  <p>some examples -</p>
  
  <p>I also find that when a projection is defined, then the link disappears. 
  For example - 
  There is UserLanguage and RefLanguage and say, there are 2 repositories UserLanguageRepository and ResfLanguageRepository , then there is also RefLangSummaryProjection</p>
  
  <p>UserLanguage -> ManytoOne -> REfLanguage
  RefLanguage -> OneToMany -> UserLanguage</p>
  
  <p>So, going to URL /userLanguages  or /userLanguages/{id} shows embedded data for RefLanguage with field coming out from RefLangSummaryProjection and link to RefLang is gone. That is probably expected however I dont like the query that is generated for REFLangSummaryProejction which still selects all columns</p>