[英]Hibernate many-to-one key with foreign key name
Using Hibernate 3.2.3 GA with hbm.xml files. 将Hibernate 3.2.3 GA与hbm.xml文件一起使用。
Having such a many-to-one key 拥有如此多对一的钥匙
<key-many-to-one name="attachment" column="attachmentId"
class="com.attachment.Attachment"/>
hibernate will auto-generate a FK on the table with some random ID (like FKD40DC872B67B3502). hibernate将使用一些随机ID(例如FKD40DC872B67B3502)自动在表格上生成FK 。
How can I set the name of the respective FK with my own cutomer FK_ID name ? 如何使用自己的用户FK_ID名称设置相应FK的名称?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.