hibernate composite-id 存储的售后一定要指明ID
例如
[code="xml"]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.model.entity.AcctUserRole" table="ACCT_USER_ROLE" schema="MODEL">
<composite-id name="id" class="com.model.entity.AcctUserRoleId">
<key-many-to-one name="acctUser" class="com.model.entity.AcctUser">
<column name="USER_ID" precision="9" scale="0" />
</key-many-to-one>
<key-many-to-one name="acctRole" class="com.model.entity.AcctRole">
<column name="ROLE_ID" precision="9" scale="0" />
</key-many-to-one>
</composite-id>
<many-to-one name="acctUser" class="com.model.entity.AcctUser" update="false" insert="false" fetch="select">
<column name="USER_ID" precision="9" scale="0" not-null="true" />
</many-to-one>
<many-to-one name="acctRole" class="com.model.entity.AcctRole" update="false" insert="false" fetch="select">
<column name="ROLE_ID" precision="9" scale="0" not-null="true" />
</many-to-one>
</class>
</hibernate-mapping>
AcctUserRole 需要保存的时候
调用如下
AcctUserRole aur = new AcctUserRole();
AcctUserRoleId auri = new AcctUserRoleId();
AcctRole ar = new AcctRole();
ar.setId(id_);
auri.setAcctRole(ar);
auri.setAcctUser(entity);
aur.setId(auri);
acctUserRoleDAO.save(aur);
分享到:
相关推荐
qt的动态场景实现源码,基于c++实现,可以作为很好的学习参考
RELEASE NOTES FOR MICROSOFT(R) TCP/IP-32 FOR WINDOWS(TM) FOR WORKGROUPS 3.11 PLEASE READ THIS ENTIRE DOCUMENT General ------- This product is compatible with, and supported exclusively on, the ...
Note that Windows 2000 systems must be running Service Pack 3 or higher. The Windows versions supported vary by Diskeeper edition. See the Table of Supported Operating Systems later in this ...
ACPI_OPERAND_OBJECT has been manually optimized to be aligned and will not work if it is byte-packed. Example Code and Data Size: These are the sizes for the OS- independent acpica.lib produced by ...
This also reduces memory footprint for ecc32/emake 8)....Added: Showing call stacks for 2 new types of fatal memory errors 9)....Added: EMemLeaks._ReserveOutOfMemory to control reserve size of out of...
You will have to manually mount the darwin.iso for example on Workstation 11 and Player 7. The vmwarebase code does not need to be patched on macOS or ESXi so you will see a message on those systems ...
npm i --save react-native-ble-manager After installing, you need to link the native library. You can either: Link native library with react-native link, or Link native library manually Both ...
10. Add XP64 & Vista64 drivers for DWL-G122 (rev.C) 11. Add XP64 drivers for DWL-G122 (rev.B) ------------------------------------------------------------------------------------------- Setup Version:...
EhLib 8.0 Build 8.0.023 Pro Edition FullSource for D7-XE8 亲测可用,含全部源码及 Demo The Library contains components and classes for Borland Delphi versions 7, 9, Developer Studio 2006, Delphi 2007...
glue_data的MRPC数据集映射文件
The origin of this software must not be misrepresented, you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product ...
We must get HTC framework resources before decoding this apk. We pull com.htc.resources.apk from our device and install it $ apktool if com.htc.resources.apk I: Framework installed to: 2.apk Now we ...
You must have an installation of RubyGems before this update can be applied. See Gem for information on RubyGems (or `ri Gem`) To upgrade to the latest RubyGems, run: $ gem update --system # you ...
The python.exe file must be on the executable PATH. If it is not on PATH please edit win-install.cmd to point to the installation path. 3. Limitations -------------- The Unlocker currently does not...
ak2新版内核 AceKard All-In-One (AK-AIO) v1.5 ... - Third option in "which cheat file to download" box displays the setting window at plugin launch, can be used for future expansion + Uses gelu's...
id -a root 显示用户所在组的所有组名(如root用户,是所有组的组员) df 查看文件系统,查看数据区 用法 df [-F FSType] [-abeghklntVvZ] [-o FSType 特定选项] [目录 | 块设备 | 资源] df -k 以kbytes显示文件...
After that, the next assignment will be to answer the same question based on monthly species inventory datasets for fi sh and invertebrates.Performing this process manually for one dataset could be ...
Since this ID must be the same ID that is also 'registered in the client machine's registry, this constant changing of the ID can 'make keeping the client and the server working together a real chore...
You will have to manually mount the darwin.iso for example on Workstation 11 and Player 7. The vmwarebase code does not need to be patched on macOS systems so you will see a message on those systems ...
This was added for specialized serial port hardware that could lockup after several hours of testing. Release 5.3 build 1017 WIN32 release 3 April 2008 - Corrected the Advanced Network test to run...