DBIx::Class::Schema::Loader 是否缓存其名字映射?

发布于 2024-09-26 10:26:54 字数 297 浏览 2 评论 0原文

最近,我们在数据库中添加了一个“audit_logs”表,经过一番挫折后,我意识到由于某种原因,数据库中已经有一个“auditlog”表。它没有被使用,所以我把它扔掉了。我从架构中删除了 Auditlog.pm 和 AuditLogs.pm 文件,然后重新生成。由于某种原因,DCSL 再次为“audit_logs”表创建了 AuditLogs.pm,即使不再有与其冲突的“auditlog”表或 Auditlog.pm 文件。

我已经尝试了几乎所有我能想到的方法来生成 Log.pm,但没有成功。我唯一能想到的是它正在某个地方缓存名字映射,而且我似乎无法重置它。

Recently we added a "audit_logs" table to the database, and after some frustration I realised that there was already an "auditlog" table in the database for some reason. It wasn't being used so I dropped it. I deleted the Auditlog.pm and AuditLogs.pm files from my schema, and then regenerated. For some reason DCSL again created AuditLogs.pm for the "audit_logs" table, even though there was no longer an "auditlog" table or Auditlog.pm file that would conflict with it.

I have tried just about everything I can think of to get it to generate Log.pm without success. The only thing that I can figure is that it is caching the moniker map somewhere, and I cannot seem to reset it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凯凯我们等你回来 2024-10-03 10:26:54

我最终将这个问题归结为 Lingua 变形器的问题。它把“logs”作为单数动词而不是复数名词。发生这种情况是因为它遵循以“it”结尾的“audit”一词。基本上,我必须编写一个自定义 moniker_map 函数,为audit_logs 添加例外。

I eventually tracked this problem down to an issue with the Lingua inflector. It was picking up "logs" as a singular verb instead of a plural noun. This happened because it followed the word "audit" which ends with "it." Basically, I had to write a custom moniker_map function that added an exception for audit_logs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文