package cl.fatman.capital.fund;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.ForeignKey;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import java.time.LocalDate;

@Entity
@Table(name = "FundRate")
public class FundRate {
	
	@Id
	@GeneratedValue(generator = "increment")
	@GenericGenerator(name = "increment", strategy = "increment")
	private int id;
	private double value;
	private LocalDate date;
	@ManyToOne
    @JoinColumn(name = "fund_id", foreignKey = @ForeignKey(name = "FUND_ID_FK"))
	private Fund fund;
	
	public FundRate(double value, LocalDate date) {
		super();
		this.value = value;
		this.date = date;
	}
	
	public FundRate() {
		super();
	}
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public double getValue() {
		return value;
	}
	
	public void setValue(double value) {
		this.value = value;
	}
	
	public LocalDate getDate() {
		return date;
	}
	
	public void setDate(LocalDate date) {
		this.date = date;
	}
	
	public Fund getFund() {
		return fund;
	}
	
	public void setFund(Fund fund) {
		this.fund = fund;
	}
}
@@ -744,24 +744,35 @@
 calDate date
+, Fund fund
 ) %7B%0A%09%09super(
@@ -808,32 +808,52 @@
 is.date = date;%0A
+%09%09this.fund = fund;%0A
 %09%7D%0A%09%0A%09public Fun

Add fund variable to the constructor.