![](/img/trans.png)
[英]Spring Boot - Hibernate import.sql column names are converted to upper case
[英]Spring Boot Autoimport import.sql file - Getting a "Column Not found" Error
所以我在 postgresql 中有一個表,我想在應用程序啟動時用一些值填充它。 這是實體(在 Kotlin 中):
@Entity
class CalculationType(
@Id @GeneratedValue(strategy = GenerationType.AUTO)
var id: Long = 0,
var guid: String = "",
var title: String = "",
var modified: Date,
var creation: Date
)
我的import.sql
文件位於..\\.\\resources
。 它看起來像這樣:
insert into calculation_type (guid, title, modified, creation) VALUES ("test", "title", "2013-12-12", "2013-12-12");
我在德語中遇到錯誤,翻譯它說Column »test« does not exist.
這很奇怪,因為test
在我的值中,而不是在我的列定義中。
有誰知道這是怎么回事?
字符常量需要單引號
insert into calculation_type (guid, title, modified, creation) VALUES ('test", 'title', '2013-12-12', '2013-12-12');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.