JPA插入语句 [英] JPA insert statement
本文介绍了JPA插入语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
JPA插入语句的正确语法是什么?这听起来像是一个简单的问题,但我一直找不到答案.
What's the correct syntax of a JPA insert statement? This might sound like an easy question but I haven't been able to find an answer.
我知道如何从Java代码中完成操作,但是我正在寻找一种在创建数据库的情况下将对象插入数据库的方法.
I know how to do it from Java code but I'm looking for a way to insert objects into the database if the database was created.
有什么想法吗?
推荐答案
到目前为止,看起来更有前途的选项是使用 Flyway .这是一种更自动化的方式,基本上可以自动处理数据库的升级过程.
The option that looks more promising so far is using Flyway. It is a more automated way of doing it and handles the upgrade process of databases basically automatically.
这篇关于JPA插入语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文