hibernate_sequence 序列名的重复条目
我将 hibernate 与 oracle 一起使用。 hibernate_sequence 表有几个sequence_name 的重复条目(一个是小写字母,另一个是大写字母)
@Entity
@Table (name = "service")
public class Service implements Serializable {
@GeneratedValue(strategy = GenerationType.TABLE, generator = "autogen")
@TableGenerator(name = "autogen", initialValue = 1, allocationSize = 1)
@Getter @Setter @Id private Long id;
,就像
Role 5
role 11
SERVICE 16
service 75
可能是 Hibernate 尝试创建相同的实体/ 的重复项使用@TableGenerator时表格两次 - 如何避免它?
I use hibernate with oracle .
hibernate_sequence table have duplicate entries for few sequence_name (One in lower case and another with uppercase letter)
@Entity
@Table (name = "service")
public class Service implements Serializable {
@GeneratedValue(strategy = GenerationType.TABLE, generator = "autogen")
@TableGenerator(name = "autogen", initialValue = 1, allocationSize = 1)
@Getter @Setter @Id private Long id;
Like
Role 5
role 11
SERVICE 16
service 75
Could be a duplicate of Hibernate tries to create same Entity/Table twice when @TableGenerator is used - how to avoid it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来与其他问题不同,其中发布者试图创建具有相同名称的实体和生成器表。看起来你只需要清理你的名字并让它们一致地使用相同的大小写。
This doesn't look like the same problem as that other question, where the poster was trying to create both an entity and a generator table with the same name. It looks like you just need to clean up your names and make them use the same case consistently.