Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TradingAccount {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Long id;
- @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
- @JoinColumn(name="trading_account_id", referencedColumnName = "trading_account_id", insertable = false, updatable = false)
- private List<UnderlyingPerTradingAccount> underlyingPerTradingAccounts;
- @Version
- private Long version;
- }
- public class UnderlyingPerTradingAccount {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Long id;
- @ManyToOne
- @JoinColumn(name="trading_account_id", nullable = false)
- private TradingAccount tradingAccount;
- private Boolean enableBuy;
- private Boolean enableSell;
- }
Add Comment
Please, Sign In to add comment