I fail to understand the use of this Annotation as in theory we could do the same thing with @JoinColumn annotation and the @ManyToOne relationship. TSo why do we need this afteral when we have some other alternativs?
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
@SecondaryTable enables you, to use fields from a secondary table directly in your entity. That means you need to define just one entity. The other techniques like @OneToOne or @ManyToOne need two entities.
So, if there is no further need for an entity consisting of fields from the secondary table, one might prefer to use @Secondary table.