原文引自:
http://hi.baidu.com/%B2%BB%BA%C8%CB%AE%B5%C4%C4%E0%F6%FA/blog/item/b448463c4d2011cc9e3d6259.html
具体错误为在one-to-many中,对many进行save时,由于没有加入one的外建,导致错误。
具体解决方法一:
1.在one的hbm文件中 invest=true
2.在many保存前务必要求one的存在
解决方法二:
public void fff(Terminal terminal){
addTerminal(terminal);
TerminalEvent event = new TerminalEvent();
event.setTerminal(terminal);
addEvent(event);
}
Terminal 与TerminalEvent 关系是one-many
问题是由于对event进行保存时没有加入termina的外键
解决方法:
public void fff(Terminal terminal){
Terminal terminal2 = new Terminal();//关键点:重新new一个Terminal 对象
terminal2.setTerminalsn(Terminal.getTerminalsn);
addTerminal(terminal2 );
TerminalEvent event = new TerminalEvent();
event.setTerminal(terminal2 );
addEvent(event);
}
相关推荐
THE WAVELET ANALYSIS METHD ON THE TRANSIENT SIGNAL
The effects of surface wettability, from superhydrophilic to superhydrophobic, on transient pool boiling of water under atmospheric pressure were experimentally examined by means of the quenching ...
Static Exciters IEEE ST1A, power system stabilizer with multi-machine, nine-bus ... The base MVA is 100, and system frequency is 60 Hz, The disturbance here is the transient by a single-phase fault time
### Java中的transient关键字详解 在Java编程语言中,`transient`关键字是一个非常重要的概念,主要用于对象序列化过程中对特定变量的控制。当一个类实现了`Serializable`接口时,其对象可以被序列化为一个持久化的...
Transient Voltage Suppressors (TVS’s) are devices used to protect vulnerable circuits from electrical overstress such as that caused by electrostatic ...of the transient to a nondestructive level.
Java 中的 transient 关键字 在 Java 编程中,transient 关键字是一个非常重要的概念,它用来说明一个属性是临时的,不会被序列化。在 Java 中,序列化是指将对象的状态信息转换为字节流的过程,以便于对象在网络上...
This is coding for case transient stabilit. this is simple m file for solve the transient stability case
在Java编程语言中,`transient`是一个非常重要的关键字,它与对象持久化和序列化密切相关。当一个字段被声明为`transient`时,它表明该字段的值不会随着对象的序列化而保存。这通常用于那些不希望或者不需要在序列化...
The test results demonstrate the superiority of the both DL algorithms over other methods in the application of power system transient disturbance classification. Keywords—Convolutional Neural ...
At t = 0 s, the DC/DC converter applies 100Vdc to the RL load (the initial ... The peak voltage of 122Vdc at the beginning of the simulation is caused by the transient state of the voltage regulator. At
transient stability matlab
文章还介绍了一些关键词,如kurtogram(kurtogram)、谱峭度(Spectral kurtosis)、瞬态检测(Transient detection)、振动监控和诊断(Vibration surveillance and diagnostics)、时频分析(Time–frequency ...
在Java编程语言中,`transient`是一个非常重要的关键字,它与对象的序列化息息相关。序列化是将一个对象的状态转换为字节流的过程,这样就可以存储或在网络中传输。当我们标记一个字段为`transient`时,意味着该字段...
Although the siliconavalanche junction Transient Voltage Suppressor (SAJTVS) will first fail short in most applications, there is alwaysone transient event that will cause it to open initially. In ...
transient是Java语言的关键字,用来表示一个域不是该对象串行化的一部分。当一个对象被串行化的时候,
TRANSIENT仿真(以共射放大器为例)工程
标题:Transient analysis of 1D inhomogeneous media by dynamic inhomogeneous finite element method 基于动态非均匀有限元方法的一维非均匀介质瞬态分析
The transient response of any natural system is the way in which the response of the system behaves as a function of time. Electromagnetic transient studies have always played an essential behavior ...
在传热学领域,"1-D Transient"指的是在一维空间中的瞬态传热过程,这是一个重要的理论与实践相结合的课题。本资源包提供了一维非稳态传热分析的学习材料,包括一个实际的小案例和相关的MATLAB程序,旨在帮助学习者...