text: Q:
  
  Adding foreign attributes to an Entity as if they are its own
  
  For one-to-one relationships, is it possible to put an attribute of a foreign table in an @Entity as if it belonged to that @Entity? I might explain myself best with an example.
  Let's say I have a table foo with a big amount of records. Some of these records can have an extra textual property bar, but most of them won't. To save space, I'd opt to put that extra property in a separate table bar. In my Foo POJO, I'd then add a property that looks something like:
  @OneToOne
  @JoinColumn(name = "fooID")
  private Bar bar;
  
  Wherever I'd like to access the bar property of my foo object, I'd have to write:
  foo.getBar().getBar();
  
  Which looks a bit silly, especially in the case where a Bar POJO only has one property bar. Could it be possible to use some magical annotations, like Jackson's @JsonUnwrapped, that allow me to but Bar's properties directly on Foo like so?
  @OneToOne(...)
  @JoinColumn(...)
  @MaybeSomeMoreMagicalAnnotations
  private String bar;
  
  A:
  
  You can do this using the @SecondaryTable annotation on your Foo class
  @Entity
  @Table(name = "foo")
  @SecondaryTable(name = "bar")
  public class Foo {
  
      @Column(table = "bar")
      private String bar;
  
      (everything else)
  }
  
  