id列

myzjeezk  于 2021-07-26  发布在  Java
关注(0)|答案(0)|浏览(232)

我以前也问过类似的问题,但还是没有答案。这是我的代码和日志。

package com.yunus.ccApp.entities;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "URUNLER")
public class UrunEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "URUN_ID")
    private int urunId;

    @Column(name = "DOGUM_AGIRLIGI")
    private Double dogumAgirligi;

    @Column(name = "DOGUM_SEKLI")
    private String dogumSekli;

    @Column(name = "DOGUM_TARIHI")
    private String dogumTarihi;

    @Column(name = "HAYVAN_ADI")
    private String hayvanAdi;

    @Column(name = "HAYVAN_ANNE_ADI")
    private String hayvanAnneAdi;

    @Column(name = "HAYVAN_CINSIYET")
    private String hayvanCinsiyet;

    @Column(name = "HAYVAN_IRKI")
    private String hayvanIrki;

    @Column(name = "HAYVAN_KUPE_NO")
    private int hayvanKupeNo;

    @Column(name = "HAYVAN_RESMI")
    private String hayvanResmi;

    @Column(name = "SUT_MIKTARI")
    private Double sutMiktari;

    @Column(name = "SUT_TARIHI")
    private String sutTarihi;

    @Column(name = "TOHUMA_HAZIR")
    private Boolean tohumaHazir;

    @Column(name = "URUN_TUTAR")
    private Double urunTutar;

    @Column(name = "USER_ID")
    private Integer userId;

   //getter and setters

这是我的错误代码。我研究了那么多,但什么也找不到。他们说是关于关键敏感度,但我不这么认为。因为我什么都试过了。
当我试图发送一个get post时,每次在每个查询中都会遇到这个错误。请帮帮我。

SQL Error: 42122, SQLState: 42S22

2021-01-15 19:21:12.124错误13516---[nio-6161-exec-1]o.h.engine.jdbc.spi.sqlexceptionhelper:找不到列“urun\u id”[42122-200]2021-01-15 19:21:12.145错误13516---[nio-6161-exec-1]o.a.c.c.c.c.[[dispatcherservlet]:路径为[/invoicecontrol]的上下文中servlet[dispatcherservlet]的servlet.service()抛出异常[request]处理失败;嵌套异常为org.springframework.dao.invaliddataaccessresourceusageexception:无法执行查询;sql[从urunler选择count(*)];嵌套的异常是org.hibernate.exception.sqlgrammareexception:无法执行查询],根本原因是
org.h2.jdbc.jdbcsqlsyntaxerrorexception:在org.h2.message.dbexception.getjdbcsqlexception(dbexception)中找不到列“urun\u id”[42122-200]。java:453)[h2-1.4.200。jar:1.4.200]

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题