开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜