第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

hibernate配置文件中的htm2ddl.auto屬性設(shè)置為create,但是生成對(duì)象到數(shù)據(jù)庫(kù)時(shí)是累加的

如題,<property name="htm2ddl.auto">create</property><!-- DDL語(yǔ)句生成策略 -->配置文件中是這么寫的,不過(guò)每生成一個(gè)對(duì)象,并不像視頻中說(shuō)的那樣會(huì)把數(shù)據(jù)庫(kù)中的表刪掉重建,而是將對(duì)象直接插入到表中。

以下是控制臺(tái)顯示的全部?jī)?nèi)容

2017-5-5 20:09:09 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}

2017-5-5 20:09:09 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.4.Final}

2017-5-5 20:09:09 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

2017-5-5 20:09:09 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

2017-5-5 20:09:09 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml

2017-5-5 20:09:09 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /hibernate.cfg.xml

2017-5-5 20:09:09 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity

WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

2017-5-5 20:09:09 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: User.hbm.xml

2017-5-5 20:09:09 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity

WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

2017-5-5 20:09:09 org.hibernate.cfg.Configuration doConfigure

INFO: HHH000041: Configured SessionFactory: null

2017-5-5 20:09:09 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)

2017-5-5 20:09:09 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000115: Hibernate connection pool size: 20

2017-5-5 20:09:09 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000006: Autocommit mode: false

2017-5-5 20:09:09 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000401: using driver [oracle.jdbc.driver.OracleDriver] at URL [jdbc:oracle:thin:@localhost:1521:orcl]

2017-5-5 20:09:09 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000046: Connection properties: {user=MKADMIN, password=****}

2017-5-5 20:09:09 org.hibernate.dialect.Dialect <init>

INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect

2017-5-5 20:09:09 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation

INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException

2017-5-5 20:09:09 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService

INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)

2017-5-5 20:09:09 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>

INFO: HHH000397: Using ASTQueryTranslatorFactory

Hibernate:?

? ? insert?

? ? into

? ? ? ? users

? ? ? ? (username)?

? ? values

? ? ? ? (?)


正在回答

3 回答

<property name="hbm2ddl.auto">create</property>這句你寫錯(cuò)了,是hbm2ddl.auto不是html2ddl.auto??!



0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

迷失代碼林 提問(wèn)者

非常感謝!
2017-05-09 回復(fù) 有任何疑惑可以回復(fù)我~

我是參照視頻里的操作的,這應(yīng)該沒(méi)什么問(wèn)題吧,但是結(jié)果就是這樣,生成幾次就有幾個(gè)對(duì)象保存到數(shù)據(jù)庫(kù)中了,而視頻中只存在一個(gè)對(duì)象,舊的會(huì)被刪掉。

0 回復(fù) 有任何疑惑可以回復(fù)我~

是不是你單元測(cè)試運(yùn)行錯(cuò)了呀,你的調(diào)試信息是 Insert 語(yǔ)句,正常情況應(yīng)該是?create 語(yǔ)句

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

hibernate配置文件中的htm2ddl.auto屬性設(shè)置為create,但是生成對(duì)象到數(shù)據(jù)庫(kù)時(shí)是累加的

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)