I have a situation like , I need to save some receipt details in a table and along with that receipt file will also be there. SO I decided to keep 2 table one for receipt_details and other for receipt_file
class ReceiptDetails{
@Id
int id;
BigDecimal amount;
//Otherstuff
}
Here i have to include receiptFile
details such as content, filename etc from second table as well.
Should I use @OnetoOne
or @SecondaryTable
in this scenario. In what situation each annotation fits?