Hi,
I am trying to persist the following objects in the listed tables.
To specify in the .hbb.xml, How do I specify this?
Eithe one Mapping XML or Two XML Mapping?
If I use <sub-class>, Can I define the TradeTypeA class persistence mapping in a different xml file?
Please help me out here.
Thanks,
Idhaya
CREATE TABLE TradeHeader (
tradeId int NOT NULL,
status char(10) NOT NULL,
inTime datetime NOT NULL,
operator char(10) NOT NULL,
)
ALTER TABLE TradeHeader ADD CONSTRAINT PK_TradeHeader
PRIMARY KEY (tradeId)
CREATE TABLE TradeTypeA (
tradeId int NOT NULL,
valueDate datetime NOT NULL,
dealDate datetime NOT NULL,
book char(5) NOT NULL,
)
ALTER TABLE TradeTypeA ADD CONSTRAINT PK_TradeTypeA
PRIMARY KEY (tradeId)
GO
ALTER TABLE TradeTypeA ADD CONSTRAINT FK_TradeTypeA_TradeHeader
FOREIGN KEY (tradeId) references TradeHeader(tradeId)
GO
public class TradeHeader implements java.io.Serializable {
private java.lang.Integer TradeId;
private java.lang.String Status;
private java.util.Date InTime;
private java.lang.String Operator;
}
public class TradeTypeA extends TradeHeader implements java.io.Serializable {
private java.util.Date ValueDate;
private java.util.Date DealDate;
private java.lang.Character Book;
}
|