亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

休眠:合并/插入操作期間缺少參數

休眠:合并/插入操作期間缺少參數

UYOU 2021-08-25 09:54:17
我想在 DB 上插入一個條目,該條目已填充所有字段,并且與另一個表/類具有 @ManyToOne 關系。為此,我正在調用entityManager.merge(c1),其中 myc1是一個Classification實例(根據下面的定義),我可以在日志中看到以下內容:[DEBUG] ...: c=o.h.SQL, m=logStatement, l=92, msg: insert into plat.classification_system (year, system, id) values (?, ?, ?)[TRACE] ...: c=o.h.t.d.s.BasicBinder, m=bind, l=65, msg: binding parameter [1] as [VARCHAR] - [2012][TRACE] ...: c=o.h.t.d.s.BasicBinder, m=bind, l=65, msg: binding parameter [2] as [BIGINT] - [1000001][TRACE] ...: c=o.h.t.d.s.BasicBinder, m=bind, l=65, msg: binding parameter [3] as [VARCHAR] - [main_system]......實際上我期待看到類似......[DEBUG] ...: c=o.h.SQL, m=logStatement, l=92, msg: insert into plat.classification_system (year, system, id, classification_type) values (?, ?, ?, ?)[TRACE] ...: c=o.h.t.d.s.BasicBinder, m=bind, l=65, msg: binding parameter [1] as [VARCHAR] - [2012][TRACE] ...: c=o.h.t.d.s.BasicBinder, m=bind, l=65, msg: binding parameter [2] as [BIGINT] - [1000001][TRACE] ...: c=o.h.t.d.s.BasicBinder, m=bind, l=65, msg: binding parameter [3] as [VARCHAR] - [main_system][TRACE] ...: c=o.h.t.d.s.BasicBinder, m=bind, l=65, msg: binding parameter [4] as [VARCHAR] - [abc]...代表以下模型:    create table classification_system (     id number(19, 0) not null,     year varchar2(255 char) not null,     class_type_guid(48 char ) not null,     system varchar2(255 char) not null,     primary key (id)    )    create table class_type (      guid (48 char) not null,      code varchar2(255 char) not null,      year varchar2(255 char) not null,      system_type_guid varchar2(48 char) not null,      primary key (guid)    )    create table system_type (      guid (48 char ) not null,      code varchar2(255 char) not null,      year varchar2(255 char) not null,      primary key (guid)    )我一直在挖掘很多與@ManyToOne映射/關系相關的帖子,但還沒有找到任何我可以使用的東西。這是使用 Hibernate 5.0.9 構建的。有人可以幫我解決這個問題嗎?感謝您對此事的任何幫助。
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 120 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號