简体   繁体   English

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

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

When I gave the roo command 当我给出了roo命令

entity --class  ~.domain.User

in the roo shell, I got 在roo shell中,我得到了

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. 非常感谢你。

You could try to add the --permitReservedWords option to the entity command. 您可以尝试将--permitReservedWords选项添加到实体命令。

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

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. 我认为有一种方法可以引用所有sql标识符,但我对Roo知之甚少。

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

相关问题 错误属性名称是保留关键字 - error Attribute name is a reserved keyword 如何更新 Dynamo DB 中保留关键字的值。 错误:属性名称是保留关键字; 保留关键字:数据 - How to update a value for reserved keyword in Dynamo DB. Error: Attribute name is a reserved keyword; reserved keyword: data Java 10 中“受限关键字”和“保留类型名称”之间的概念区别是什么? - What is the conceptual difference between a “restricted keyword” and “reserved type name” in Java 10? 如何在Java中使用保留关键字声明参数名称 - How to declare a parameter name with a reserved keyword in Java 当直观名称是保留关键字时,如何简洁地命名方法/变量? - How to concisely name methods / variables when the intuitive name is a reserved keyword? 使用 Liquibase 的 JOOQ 代码生成,保留关键字? (“值”列名称错误) - JOOQ code generation with Liquibase, reserved keyword? (error with "value" column name) _(下划线)是保留关键字 - _ (underscore) is a reserved keyword Gson Java 保留关键字 - Gson Java reserved keyword 在ANTLR中重用保留关键字规则 - Reuse a reserved keyword rule in ANTLR 在Java编译器中,可以将哪种类型定义为标识符(ID)或关键字(保留字)? - In Java compiler,which type can be defined as identifier ( ID ) or Keyword (reserved word)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM