Привет
В классе InstrumentConfig, подробно описанном ниже, какие аннотации JPA2 должны иметь инструмент и рынок?
Спасибо
@Entity
@Access(AccessType.FIELD)
class Instrument {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
long id;
@Basic
String code; // EURCHF, GOOG, etc.
}
@Entity
@Access(AccessType.FIELD)
class Market {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
long id;
@Basic
String name;
}
@Entity
@Access(AccessType.FIELD)
class InstrumentConfig {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
long id;
// what JPA2 annotations should instrument and market have?
Instrument instrument;
Market market;
@Basic
String dataURL
}