开发者

How can I only autoCreateSchema if database doesn't exist yet?

开发者 https://www.devze.com 2023-01-29 12:36 出处:网络
I have the following problem: I\'m using DataNucleus with JDO for my program. My jdoconfig.xml contains the following line:

I have the following problem: I'm using DataNucleus with JDO for my program. My jdoconfig.xml contains the following line:

<property name="datanucleus.autoCreateSchema" value="true"/>

If I start my program now and the database doesn't exist yet it is created and everything works fine.

But if I stop my program and start it again and the database already exists I get errors: Constraints 'USER_U1' and 'USER_U1' have the same set of columns, which is not allowed.

How can I tell m开发者_StackOverflow中文版y program to only create the schema if it doesn't exist yet?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号