Fluent Nhibernate Oracle 标识符太长 - 别名问题
我已经尝试这样做了。
HasManyToMany<YechidotDoarInGroup>(x => x.Col_yig)
.Table("PigToYig")
.ChildKeyColumn("YIG_GROUP_RECID")
.ParentKeyColumn("PIG_GROUP_RECID");
但我有:
ORA-00942: 表或视图不存在
我试图建立 HasManyToMany 连接不是通过 ID ,而是通过 一些其他财产。
首先我收到的消息太长了。当我尝试输入自己的表名称作为别名时,它无法被识别。我应该怎么办?
I've tried to do that.
HasManyToMany<YechidotDoarInGroup>(x => x.Col_yig)
.Table("PigToYig")
.ChildKeyColumn("YIG_GROUP_RECID")
.ParentKeyColumn("PIG_GROUP_RECID");
but I've got:
ORA-00942: table or view does not exist
I am trying to establish HasManyToMany connection not by ID , but by
some other property .
First I've got - too long message. When I've tried to enter my own Table name as an alias , it's not recognized. What should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
问题很可能是这样的:
默认情况下,Oracle 对象名称是大写的。但是,Oracle 在给定情况下将名称应用双引号。换句话说,如果你的表有默认命名,你可能需要传入这个......
这取决于NHibernate如何将这些变量转换为SQL(我对NHibernate不熟悉)。
The problem may well be this:
Oracle object names are, by default, in UPPER case. However, Oracle applies names in double-quotes in the given case. In other words, if your table has the default naming you may need to pass in this instead ...
It depends how NHibernate converts those variables into SQL (I'm not familiar with NHibernate).
在所有映射声明之前定义 Table() 方法。
Define Table() method before all of your mapping declaration.
源 ora-code.com
source ora-code.com