Guest User

Untitled

a guest
Jun 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public class TradingAccount {
  2. @Id
  3. @GeneratedValue(strategy = GenerationType.IDENTITY)
  4. private Long id;
  5. @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
  6. @JoinColumn(name="trading_account_id", referencedColumnName = "trading_account_id", insertable = false, updatable = false)
  7. private List<UnderlyingPerTradingAccount> underlyingPerTradingAccounts;
  8.  
  9. @Version
  10. private Long version;
  11. }
  12.  
  13. public class UnderlyingPerTradingAccount {
  14. @Id
  15. @GeneratedValue(strategy = GenerationType.IDENTITY)
  16. private Long id;
  17. @ManyToOne
  18. @JoinColumn(name="trading_account_id", nullable = false)
  19. private TradingAccount tradingAccount;
  20. private Boolean enableBuy;
  21. private Boolean enableSell;
  22. }
Add Comment
Please, Sign In to add comment