自动创建<prop key="hibernate.hbm2ddl.auto">create</prop>
没有问题 是可以创建成功但是我改成update之后 就会报16 [2011-04-28 11:34:24,875] [main] ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:155)] - Unsuccessful: alter table XXX add abc.id varchar2(255)
16 [2011-04-28 11:34:24,875] [main] ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:156)] - ORA-00942: 表或视图不存在
这个表里有外键的关联 就是在添加外键字段的时候报表不存在。为什么create可以创建出来 而update就出这个错误
没有问题 是可以创建成功但是我改成update之后 就会报16 [2011-04-28 11:34:24,875] [main] ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:155)] - Unsuccessful: alter table XXX add abc.id varchar2(255)
16 [2011-04-28 11:34:24,875] [main] ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:156)] - ORA-00942: 表或视图不存在
这个表里有外键的关联 就是在添加外键字段的时候报表不存在。为什么create可以创建出来 而update就出这个错误
你把create换成update看看,一般都是用update的!
再用update他每次都去增加那个字段提示该字段已经存在都存在了 你还去添加啥么!