title: Spring Data REST - projection of association of the abstract type
body: <p>Having following entities (irrelevant fields ommitted):</p>
  
  <pre><code>@Entity
  public class TransferConfiguration {
  
      @ManyToOne
      @JoinColumn(name = "RECIPIENT_ID", nullable = false)
      private Party recipient;    
  }  
  
  @Entity
  @Inheritance
  @DiscriminatorColumn(name = "type")
  public abstract class Party {
  
  }
  
  @Entity
  @DiscriminatorValue("C")
  public class Customer extends Party {
  
  } 
  
  @Entity
  @DiscriminatorValue("O")
  public class OtherParty extends Party {
  
  } 
  </code></pre>
  
  <p>The association is based on abstract class. </p>
  
  <p>Now I would like to have link to the association when I get my resource, but Spring Data REST always inlines the association, giving no link in the _links section of resulting JSON.</p>
  
  <p>The output looks following:</p>
  
  <pre><code>{
    "recipient": {
      // recipient attributes inlined here
    },
    // other attributes here
    "_links": {
      "self": {
        "href": "http://myhost/api/transferConfigurations/20"
      },
      "transferConfiguration": {
        "href": "http://myhost/api/transferConfigurations/20"
      }
    }
  }
  </code></pre>
  
  <p>I have repository interfaces for both concrete classes (Customer, OtherParty), but not for the superclass itself. Now when spring-data-rest decides whether to inline the association or not, it tries to find the interface for the Party superclass, which does not exists and therefore the association is inlined.</p>
  
  <p>Is it possible to alter the behaviour somehow?</p>
  
  <p>I would like to have a link instead of inlined association. Like this:</p>
  
  <pre><code>{
    // other attributes here
    "_links": {
      "self": {
        "href": "http://myhost/api/transferConfigurations/20"
      },
      "transferConfiguration": {
        "href": "http://myhost/api/transferConfigurations/20"
      },
      "recipient": {
        "href": "http://myhost/api/transferConfigurations/20/recipient"
      },
    }
  }
  </code></pre>