@Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN) @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @MapKey(columns = @Column(name = "start_date", nullable = true)) @JoinTable(name = "item_price_timeline", joinColumns = {@JoinColumn(name = "item_id", updatable = false)}, inverseJoinColumns = {@JoinColumn(name = "price_model_id", updatable = false)} ) @Sort(type = SortType.NATURAL) @Fetch(FetchMode.SELECT) public SortedMap<Date, PriceModelDTO> getDefaultPrices() { return defaultPrices; }
@Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN) @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @MapKey(columns = @Column(name = "start_date", nullable = true)) @JoinTable(name = "plan_item_price_timeline", joinColumns = {@JoinColumn(name = "plan_item_id", updatable = false)}, inverseJoinColumns = {@JoinColumn(name = "price_model_id", updatable = false)} ) @Sort(type = SortType.NATURAL) @Fetch(FetchMode.SELECT) public SortedMap<Date, PriceModelDTO> getModels() { return models; }
@CollectionOfElements(fetch = FetchType.EAGER) @JoinTable(name = "price_model_attribute", joinColumns = @JoinColumn(name = "price_model_id")) @MapKey(columns = @Column(name = "attribute_name", nullable = true, length = 255)) @Column(name = "attribute_value", nullable = true, length = 255) @Sort(type = SortType.NATURAL) @Fetch(FetchMode.SELECT) public SortedMap<String, String> getAttributes() { return attributes; }