Redian新闻
>
How to create empty tables in JPA/Hierbnate
avatar
How to create empty tables in JPA/Hierbnate# Java - 爪哇娇娃
F*n
1
Normally I let hibernate automatically create tables for entities. But how
to create empty tables without persist any entities?
avatar
g*g
2
I normally don't use that, but I guess you can add a
entry and delete it?

【在 F****n 的大作中提到】
: Normally I let hibernate automatically create tables for entities. But how
: to create empty tables without persist any entities?

avatar
A*o
3
or run a sql statement?

【在 g*****g 的大作中提到】
: I normally don't use that, but I guess you can add a
: entry and delete it?

avatar
q*a
4
you have to know more about hibernate
avatar
t*e
5
Rephrase your question please.
Steps I took,
Use hbm2ddl to generate and run SQL script from entities,
Run DBunit to insert testing data into the tables, or ask DBAs to load
testing data for you
Write Unit test cases with Transational annotation rollback=true.
avatar
F*n
6
The step I took: directly write SQL to create tables in the DBMS. You can
create all the indexes there while JPA cannot.
I mean, it's not the point.

【在 t*******e 的大作中提到】
: Rephrase your question please.
: Steps I took,
: Use hbm2ddl to generate and run SQL script from entities,
: Run DBunit to insert testing data into the tables, or ask DBAs to load
: testing data for you
: Write Unit test cases with Transational annotation rollback=true.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。