保留的 SQL 关键字“User”不允许作为简单类型名称

发布于 2024-10-04 17:52:24 字数 280 浏览 0 评论 0原文

发出 roo 命令时

entity --class  ~.domain.User

当我在 roo shell 中

Reserved SQL keyword 'User' is not permitted as simple type name

,我想知道的是,有没有办法为实体提供别名?因为我确实有几个实体,其名称如上所述是不允许的。或者有没有办法克服这种问题?

任何帮助将不胜感激。非常感谢。

When I gave the roo command

entity --class  ~.domain.User

in the roo shell, I got

Reserved SQL keyword 'User' is not permitted as simple type name

What I want to know is that, is there a way to gave alias name to the entity ? Because I do have a couple of entities which name are not permitted as above. Or is there a way to overcome this kind of problem ?

Any help will be greatly appreciated. Thank you very much.

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

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

发布评论

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

评论(2

酒中人 2024-10-11 17:52:24

您可以尝试将 --permitReservedWords 选项添加到实体命令中。

https://jira.springsource.org/browse/ROO-1502

You could try to add the --permitReservedWords option to the entity command.

https://jira.springsource.org/browse/ROO-1502

零度° 2024-10-11 17:52:24

如果你想更改实体名称,但保留表名称:

entity --class ~.domain.FooUser --table user

我认为有一种方法可以引用所有sql标识符,但我对Roo不太了解。

If you want to change the entity name, but keep the table name:

entity --class ~.domain.FooUser --table user

I would think there is a way to quote all sql identifiers, but I don't know that much about Roo.

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