JiveJdon Community Forums
在线173人   首页   主题表   培训咨询   标签   查搜   注册    登陆 RSS
首页 » 论坛 » 语言平台技术讨论
???en_US.forumThreadPrev.name??? 上一主题
RSS google yahoo 365Key网摘 CSDN网摘 添加到百度搜藏 POCO网摘 新浪ViVi QQ网摘
???en_US.forumThreadNext.name??? 下一主题
Go 共有 0 回复(1页) 阅读85次
 发表新帖子   回复该主题贴
richard_hw2000



发表文章:
注册时间: 2003年05月23日
悄悄话
个人博客
在线? 当前离线
我要关注该作者发言
大侠留步,请问JBoss中CMR使用的问题 2003年05月23日 17:18 收藏关注本主题 到本帖网址 加入本帖到收藏夹 请用鼠标选择需要回复的文字再点按本回复键 回复该主题
标签
在JBoss中使用1对1的关联CMR时,进行数据插入时JBoss报出如下错误,请问如何解决:小弟的疑惑是userinfo是CMR的字段,和数据库表本身字段有什么区别呢,为什么会有这样的问题,急,盼复谢谢。


16:25:58,875 ERROR [TblUser] Could not create entity
java.sql.SQLException: Column (userinfo) not found in any table in the query (or SLV is undefined).


实体Bean TblUser对应表的字段为email(PK),password
TblUserinfo对应表的字段为emali(PK),firstname,lastname,addr

调用代码:
TblUser user = userHome.create(email,password);
TblUserinfo info = infoHome.create(email,firstname,lastname,addr);

ejb-jar.xml 有关releationship的描述如下:
<relationships>
<ejb-relation>
<ejb-relation-name>tblUser-tblUserinfo</ejb-relation-name>
<ejb-relationship-role>
<description>tblUser</description>
<ejb-relationship-role-name>TblUserRelationshipRole</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<description>tblUser</description>
<ejb-name>TblUser</ejb-name>
</relationship-role-source>
<cmr-field>
<description>tblUserinfo</description>
<cmr-field-name>userinfo</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<description>tblUserinfo</description>
<ejb-relationship-role-name>TblUserinfoRelationshipRole</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<description>tblUserinfo</description>
<ejb-name>TblUserinfo</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
</relationships>

jbosscmp-jdbc.xml中有关releationship的描述如下:
<relationships>
<ejb-relation>
<ejb-relation-name>tblUser-tblUserinfo</ejb-relation-name>
<foreign-key-mapping />
<ejb-relationship-role>
<ejb-relationship-role-name>TblUserRelationshipRole</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>email</field-name>
<column-name>email</column-name>
</key-field>
</key-fields>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>TblUserinfoRelationshipRole</ejb-relationship-role-name>
</ejb-relationship-role>
</ejb-relation>
</relationships>

标签
共有 0 回复(1页) Go
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表    返回页首返回页首
???en_US.forumThreadNext.name??? 下一主题
正在读取,请等待...
查询本论坛内 回复超过的热门帖子
标题
 
粗体: [b]文本[/b] 斜体: [i]文本[/i] 下划线 [u]文本[/u] 插入网上的图片 [img]http://wwww.xxxx.com/img.ext[/img] 插入代码 [code]程序代码[/code]  插入url链接 [url]http://url[/url] / [url=http://url]URL加下滑线[/url] 上传图片 word文档 Txt等附件
内容
  提交时自动拷贝以上内容到剪贴板 Ctrl+V可取出;提问题前先查询标签列表

使用帮助 手机m.jdon.com RSS add to google add to yahoo
解惑之道在J道 ,打造中国最具影响力的的软件架构社区 推荐FireFox或Chrome快速浏览本站
OpenSource JIVEJDON Powered by JdonFramework Code © 2002-10 jdon.com

anti spam