简体   繁体   English

Subsonic 3.0错误?

[英]Subsonic 3.0 Bug?

I have a table named "data_buckets" and a column in that table named "data_bucket". 我有一个名为“ data_buckets”的表,该表中有一列为“ data_bucket”。 When I buid the activerecord.cs, subsonic created a class name "data_bucket" (extending IActiveRecord) for the table and obviously a conflict will arise when you try to access the field "data_bucket". 当我创建activerecord.cs时,subsonic为表创建了一个类名“ data_bucket”(扩展了IActiveRecord),当您尝试访问字段“ data_bucket”时,显然会发生冲突。 Is it a known issue? 这是一个已知问题吗? Is there any workaround without having to rename the table or the column? 是否有任何解决方法而不必重命名表或列?

Thanks for your help. 谢谢你的帮助。

Look in your Settings.ttinclude template file for SubSonic and modify the string CleanUp(string tableName) function. 在您的Settings.ttinclude模板文件中查找SubSonic,然后修改string CleanUp(string tableName)函数。

Despite the function's name, more than just table names will get passed through it (procedure names, procedure argument names, table column names, etc). 尽管有函数名,但传递的不仅仅是表名(过程名,过程参数名,表列名等)。

You can do whatever renaming's you need, like removing underscores. 您可以执行所需的任何重命名操作,例如删除下划线。

I encountered similar problem. 我遇到了类似的问题。 I think that renaming of the column is only way to fix it. 我认为重命名该列只是解决它的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM