外键无法识别
当使用 subsonic 从 mysql 生成 activerecord.cs 时,模板会忽略一些外键。它承认表和列,但不承认关系。
我已经检查了所有基本的事情,例如确保其正确的数据库、刷新的表、删除的类等。
数据库是使用转储创建的。当我从这个版本生成时,一切正常。然后我添加一些与现有表格相关的表格。当我再次生成时,新的关系会被亚音速错过。新表与现有表具有相同的外键。
任何想法都会在这个阶段帮助我,
谢谢
when generating an activerecord.cs from mysql using subsonic, some foreign keys are overlooked by the template. it acknowledges the table and columns, just not the relations.
i have checked all the basic things like made sure its the correct db, flushed tables, deleted classes etc.
the db is created using a dump. when i generate from this version everything works correctly. i then add some tables, which relate to existing ones. when i generate again, the new relations are missed by subsonic. the new tables have the same foreign key as existing tables.
ANY ideas will help me at this stage
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了它。虽然我的连接字符串是正确的(用于表生成),但 Settings.ttinclude 中的以下行不正确(用于外键生成):
solved it. although my connection string was correct(used for table generation), the following line was incorrect(used for foreign key generation) in Settings.ttinclude: