middlegen 生成one to one mapping xml 問題
我用的是mysql 資料庫
建立了兩個表
CREATE TABLE `person` (
`id` varchar(100) NOT NULL default '0',
`company_id` varchar(100) NOT NULL default '',
`name` varchar(100) NOT NULL default '',
`address` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`),
CONSTRAINT REF FOREIGN KEY (id) REFERENCES cat(cat_id),
) TYPE=MyISAM;
CREATE TABLE `cat` (
`cat_id` varchar(32) NOT NULL default '',
`name` varchar(16) default '',
`sex` char(1) NOT NULL default '',
`weight` double NOT NULL default '0',
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM;
想用middlegen 生成相對應的 hibernate one-to-one 的 mapping xml 檔案 但是執行middlegen後 發現這兩張表之間並沒有連線關聯 然後資料庫中到處表person的sql發現 CONSTRAINT REF FOREIGN KEY (id) REFERENCES cat(cat_id),這句話麼有了? 這是怎麼回事啊?怎麼讓這兩張表在middlegen中有連線關聯呢?
建立了兩個表
CREATE TABLE `person` (
`id` varchar(100) NOT NULL default '0',
`company_id` varchar(100) NOT NULL default '',
`name` varchar(100) NOT NULL default '',
`address` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`),
CONSTRAINT REF FOREIGN KEY (id) REFERENCES cat(cat_id),
) TYPE=MyISAM;
CREATE TABLE `cat` (
`cat_id` varchar(32) NOT NULL default '',
`name` varchar(16) default '',
`sex` char(1) NOT NULL default '',
`weight` double NOT NULL default '0',
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM;
想用middlegen 生成相對應的 hibernate one-to-one 的 mapping xml 檔案 但是執行middlegen後 發現這兩張表之間並沒有連線關聯 然後資料庫中到處表person的sql發現 CONSTRAINT REF FOREIGN KEY (id) REFERENCES cat(cat_id),這句話麼有了? 這是怎麼回事啊?怎麼讓這兩張表在middlegen中有連線關聯呢?
相關文章
- vegetable one(tomcat問題)Tomcat
- tomcat one connection one thread one request one threadTomcatthread
- SAP CRM One order裡user status和system status的mapping邏輯APP
- "ScrollView can host only one direct child"問題解決View
- one drive
- UVALive 3882--And Then There Was One+約瑟夫環問題變形
- One-on-One Oracle閱讀筆記2(轉)Oracle筆記
- python & MySQLdb(one)PythonMySql
- SpringMVC_OneSpringMVC
- plus_one
- vue grammer oneVue
- Django & SQLite All In OneDjangoSQLite
- [leetcode]plus-oneLeetCode
- AirPods 4 All In OneAI
- 澳洲 WHV All In One
- drop apply INSTANTIATION for one tableAPP
- one-hot編碼
- JavaScript Compact Object All In OneJavaScriptObject
- ray tracing in one weekend - 5
- Canvas errors & CORS All In OneCanvasErrorCORS
- nvm command errors All In OneError
- React 18 errors All In OneReactError
- VUE學習day oneVue
- LeetCode Patching Array All In OneLeetCode
- 『vulnhub系列』EVILBOX-ONE
- Studio One 6 中文下載Mac版+Studio One 6啟用許可Mac
- All in one入門之All in one和三種PVE、ESXI、Windows Server方案WindowsServer
- 623-Add One Row to Tree
- Chapter One————1、行前準備APT
- 勝訴退費 All In One
- free Generative AI courses All In OneAI
- FSM:One-hot logic equations
- java筆記-one(簡記)Java筆記
- Setup Standby Database on One PC(轉)Database
- rocky one 遠端登入
- [反悔貪心] Add One 2
- The English names of various berries All In One
- Web Page Marker Pen All In OneWeb
- Shopify 建站開發 All In one