简体   繁体   English

如何持久化地图 <String, Embeddable type> 在MySQL中使用休眠

[英]How persist Map<String, Embeddable type> using hibernate in mySQL

I want to use Hibernate(4.3.6 Final) to persist a Map with basic type as key and non entity embeddable compound type value as value. 我想使用Hibernate(4.3.6 Final)来保留基本类型为键,非实体可嵌入复合类型值为value的Map。

I didn't have any problem with basic type as key and value I done everything in the same way and it was ok. 我对基本类型作为键和值没有任何问题,我以相同的方式完成了所有事情,而且还可以。 I have problem when I change value of map to embeddable compound type as I show it below. 当我将map的值更改为可嵌入的复合类型时,我遇到问题,如下所示。

But i getting error: 但我得到错误:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'hash' in 'field list' 引起原因:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:“字段列表”中的未知列“哈希”

Could You help what I doing wrong or what I miss? 您能帮助我做错或想念的事情吗?

Table prepared to persist my map 表准备保存我的地图

image of table user_address 表user_address的图像

My Map to persist in entity USER (fragment) 我的地图保留在实体USER(片段)中

@ElementCollection
@CollectionTable(name="USER_ADDRESS", joinColumns=@JoinColumn(name="USER_ID"))
@MapKeyColumn(name="ADDRESS_TYPE")
@AttributeOverrides({@AttributeOverride(name="addressLine1", column=@Column(name="USER_ADDRESS_LINE_1")),
        @AttributeOverride(name="addressLine2", column=@Column(name="USER_ADDRESS_LINE_2"))})
private Map<String,Address> address = new HashMap<String, Address>();

Embeddable compound type ADDRESS (fragment) 可嵌入的化合物类型ADDRESS(片段)

@Embeddable
public class Address {

@Column(name="ADDRESS_LINE_1")
private String addressLine1;

@Column(name="ADDRESS_LINE_2")
private String addressLine2;

@Column(name="CITY")
private String city;

@Column(name="STATE")
private String state;

@Column(name="ZIP_CODE")
private String zipCode;

public Address() {
}

Main method public class Application { 主要方法公共类申请{

public static void main(String[] args) {
    Session session = HibernateUtil.getSessionFactory().openSession();

    try {
        Transaction transaction = session.beginTransaction();


        User user = new User();

        Address address = new Address();
        Address address2 = new Address();
        setAddressFields(address);
        setAddressFields2(address2);
        user.getAddress().put("ONE",address);
        user.getAddress().put("TWO",address2);
        setUserFields(user);

        session.save(user);

        transaction.commit();

    } catch (Exception e) {
        e.printStackTrace();
    }finally{
        session.close();
        HibernateUtil.getSessionFactory().close();
    }


}

private static void setUserFields(User user) {
    user.setAge(22);
    user.setBirthDate(new Date());
    user.setCreatedBy("kmb");
    user.setCreatedDate(new Date());
    user.setEmailAddress("kmb385");
    user.setFirstName("Kevin");
    user.setLastName("bowersox");
    user.setLastUpdatedBy("kevin");
    user.setLastUpdatedDate(new Date());
}

private static void setAddressFields(Address address) {
    address.setAddressLine1("Line 1");
    address.setAddressLine2("Line 2");
    address.setCity("New York");
    address.setState("NY");
    address.setZipCode("12345");
}

private static void setAddressFields2(Address address) {
    address.setAddressLine1("Line 3");
    address.setAddressLine2("Line 4");
    address.setCity("Corning");
    address.setState("NY");
    address.setZipCode("12345");
}

}

Full text of error: 错误全文:

DEBUG - insert into USER_ADDRESS (USER_ID, hash, value, ADDRESS_LINE_1, ADDRESS_LINE_2, CITY, STATE, ZIP_CODE) values (?, ?, ?, ?, ?, ?, ?, ?) Hibernate: insert into USER_ADDRESS (USER_ID, hash, value, ADDRESS_LINE_1, ADDRESS_LINE_2, CITY, STATE, ZIP_CODE) values (?, ?, ?, ?, ?, ?, ?, ?) DEBUG - could not execute statement [n/a] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'hash' in 'field list' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.Util.getInstance(Util.java:387) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) 调试-插入USER_ADDRESS(USER_ID,哈希,值,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE,ZIP_CODE)值(?,?,?,?,?,?,?,?)休眠:插入USER_ADDRESS(USER_ID,哈希,值ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE,ZIP_CODE)值(?,?,?,?,?,?,?,?,?)调试-无法执行语句[n / a] com.mysql.jdbc.exceptions.jdbc4 .MySQLSyntaxErrorException:sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native方法)的sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)处sun.reflect.DelegatingConstructorAccessorImpl.newInstance的``字段列表''中的未知列'hash' .java:45),位于com.mysql.jdbc.Util.handleNewInstance(Util.java:404),位于com.mysql.jdbc.Util.getInstance(java.lang.reflect.Constructor.newInstance(Constructor.java:423) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)处的util.java:387)com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)处的Util.java:387) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009) at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1311) at org.hibernate.acti 在com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)在com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)在com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) )com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java: 2073)位于com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java :1994),位于组织org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)的org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)。 hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1311)在org.hibernate.acti on.internal.CollectionRecreateAction.execute(CollectionRecreateAction.java:67) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177) at com.infiniteskills.data.Application.main(Application.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMeth 在org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)上的org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:上的on.internal.CollectionRecreateAction.execute(CollectionRecreateAction.java:67) 349),位于org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350),位于org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56),位于org.hibernate.internal.SessionImpl.flush (位于org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)的org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)的(SessionImpl.java:1222)。 hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)位于com.infiniteskills.data.Application.main(Application.java:33)位于sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)位于sun。 reflect.NativeMethodAccessorImpl.invoke(NativeMeth odAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) WARN - SQL Error: 1054, SQLState: 42S22 ERROR - Unknown column 'hash' in 'field list' INFO - HHH000010: On release of batch it still contained JDBC statements DEBUG - HHH000420: Closing un-released batch DEBUG - Releasing JDBC connection DEBUG - Released JDBC connection DEBUG - HHH000031: Closing DEBUG - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries org.hibernate.exception.SQLGrammarException: could not execute statement at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:80) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.j odAccessorImpl.java:62)位于sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.invoke(Method.java:498)在com.intellij.rt.execution.application.AppMain .main(AppMain.java:144)警告-SQL错误:1054,SQLState:42S22错误-“字段列表”中的未知列“哈希”信息-HHH000010:在批量发布时,它仍包含JDBC语句DEBUG-HHH000420:关闭-已发布的批处理DEBUG-释放JDBC连接DEBUG-已释放的JDBC连接DEBUG-HHH000031:关闭DEBUG-在注销所有子ServiceRegistries org.hibernate.exception.SQLGrammarException时隐式销毁ServiceRegistry:无法在org.hibernate.exception上执行语句。 org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)处的internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:80)在org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.j ava:126) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211) at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1311) at org.hibernate.action.internal.CollectionRecreateAction.execute(CollectionRecreateAction.java:67) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222) at org.hibernate.internal.SessionImpl.managedF ava:126)位于org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)位于org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211) .engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)位于org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1311)位于org.hibernate.action.internal.CollectionRecreateAction.execute (CollectionRecreateAction.java:67)在org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)在org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349)在org.hibernate。 org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)的event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222)在org.hibernate.internal.SessionImpl.managedF lush(SessionImpl.java:425) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177) at com.infiniteskills.data.Application.main(Application.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'hash' in 'field list' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newI org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)的lush(SessionImpl.java:425)在org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java: 177)在com.infiniteskills.data.Application.main(Application.java:33)在sun.reflect.NativeMethodAccessorImpl.invoke0(自然方法)在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)在sun.reflect .com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)上的.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在java.lang.reflect.Method.invoke(Method.java:498)创建人:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native方法)的sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native方法)的字段列中的未知哈希(NativeConstructorAccessorImpl.java:62) ),位于sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.Util.getInstance(Util.java:387) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009) at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatem nstance(DelegatingConstructorAccessorImpl.java:45)(位于java.lang.reflect.Constructor.newInstance(Constructor.java:423)(位于com.mysql.jdbc.Util.handleNewInstance(Util.java:404))(位于com.mysql.jdbc.Util) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)处com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)处的.getInstance(Util.java:387)。 com.mysql.jdbc上的MysqlIO.checkErrorPacket(MysqlIO.java:3814)com.mysql.jdbc上的MysqlIO.sendCommand(MysqlIO.java:2478)com.mysql.jdbc上的com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)处com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)处的.ConnectionImpl.execSQL(ConnectionImpl.java:2551) com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)处的db.preparedStatement.executeUpdateInternal(PreparedStatement.java:2009)com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatem ent.java:1994) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) ... 17 more INFO - HHH000030: Cleaning up connection pool [jdbc:mysql://localhost:3306/ifinances] DEBUG - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries ent.java:1994),位于org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)...还有17个信息-HHH000030:清理连接池[jdbc:mysql:// localhost:3306 / ifinances]调试-取消所有子ServiceRegistries的注册后,会隐式破坏Bootstrap注册表

The most interesting IMO fragment of error listening 最有趣的IMO错误侦听片段

Hibernate try to use sql insert with hash and value but of course I don't have these columns in my table. Hibernate尝试使用带有哈希值和值的sql插入,但是当然我的表中没有这些列。

DEBUG - insert into USER_ADDRESS (USER_ID, hash, value, ADDRESS_LINE_1, ADDRESS_LINE_2, CITY, STATE, ZIP_CODE) values (?, ?, ?, ?, ?, ?, ?, ?) Hibernate: insert into USER_ADDRESS (USER_ID, hash, value, ADDRESS_LINE_1, ADDRESS_LINE_2, CITY, STATE, ZIP_CODE) values (?, ?, ?, ?, ?, ?, ?, ?) 调试-插入USER_ADDRESS(USER_ID,哈希,值,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE,ZIP_CODE)值(?,?,?,?,?,?,?,?)休眠:插入USER_ADDRESS(USER_ID,哈希,值,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE,ZIP_CODE)值(?,?,?,?,?,?,?,?)

Thank you in advance for advices 预先感谢您的建议

As i think i partialy found solution. 我认为我偏爱找到了解决办法。

There is a problem with @AttributeOverride, I don't know why because I've used exactly the same notation to persist a Collection of Addresses(Embeddable compound type) @AttributeOverride存在问题,我不知道为什么,因为我使用了完全相同的符号来保存地址集合(可嵌入复合类型)

I will be very grateful for help why there is a problem when I try to override column names in case when I using a Map, and everything is ok when I try to persist a Collection of the same embeddable compound type(Address) 我将非常感谢您的帮助,为什么在使用Map的情况下尝试覆盖列名时出现问题,而当我尝试保留相同可嵌入化合物类型(地址)的Collection时一切正常

When I changed class Address to avoid override columns name, my Map was successfully persisted. 当我更改类地址以避免覆盖列名时,我的地图成功保存了。 In other words I have changed column names of Address type to correspond exactyly to the column names in USER_ADDRESS. 换句话说,我已经更改了地址类型的列名,使其与USER_ADDRESS中的列名完全对应。

Changed compound embeddable type 更改了复合可嵌入类型

Now column names correspond exactly to the column names in table to persist map 现在,列名称与表中的列名称完全对应以持久化映射

@Embeddable
public class Address {

    @Column(name="USER_ADDRESS_LINE_1")
    private String addressLine1;

    @Column(name="USER_ADDRESS_LINE_2")
    private String addressLine2;

    @Column(name="CITY")
    private String city;

        @Column(name="STATE")
    private String state;

    @Column(name="ZIP_CODE")
    private String zipCode;

    public Address() {
    }
...

Map to persist without Override 映射以持久化而不覆盖

@ElementCollection
@CollectionTable(name="USER_ADDRESS", joinColumns=@JoinColumn(name="USER_ID"))
@MapKeyColumn(name="ADDRESS_TYPE")
@Columns(columns = {
        @Column(name="USER_ADDRESS_LINE_1"),
        @Column(name="USER_ADDRESS_LINE_2"),
        @Column(name="CITY"),
        @Column(name="STATE"),
        @Column(name="ZIP_CODE")
})
private Map<String,Address> address = new HashMap<String, Address>();

Result 结果

select from table USER_ADDRESS after map has been saved 保存地图后,从表USER_ADDRESS中选择

保存地图后,从表USER_ADDRESS中选择

Hibernate: insert into USER_ADDRESS (USER_ID, ADDRESS_TYPE, USER_ADDRESS_LINE_1, USER_ADDRESS_LINE_2, CITY, STATE, ZIP_CODE) values (?, ?, ?, ?, ?, ?, ?) DEBUG - insert into USER_ADDRESS (USER_ID, ADDRESS_TYPE, USER_ADDRESS_LINE_1, USER_ADDRESS_LINE_2, CITY, STATE, ZIP_CODE) values (?, ?, ?, ?, ?, ?, ?) Hibernate: insert into USER_ADDRESS (USER_ID, ADDRESS_TYPE, USER_ADDRESS_LINE_1, USER_ADDRESS_LINE_2, CITY, STATE, ZIP_CODE) values (?, ?, ?, ?, ?, ?, ?) DEBUG - Done inserting collection: 2 rows inserted DEBUG - committed JDBC Connection DEBUG - HHH000420: Closing un-released batch DEBUG - Releasing JDBC connection DEBUG - Released JDBC connection DEBUG - HHH000031: Closing DEBUG - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries INFO - HHH000030: Cleaning up connection pool [jdbc:mysql://localhost:3306/ifinances] DEBUG - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries 休眠:插入USER_ADDRESS(USER_ID,ADDRESS_TYPE,USER_ADDRESS_LINE_1,USER_ADDRESS_LINE_2,CITY,STATE,ZIP_CODE)值(?,?,?,?,?,?,?,?)调试-插入USER_ADDRESS(USER_ID,ADDRESS_TYPE,USER_ADDRESS CITY,STATE,ZIP_CODE)值(?,?,?,?,?,?,?)休眠:插入USER_ADDRESS(USER_ID,ADDRESS_TYPE,USER_ADDRESS_LINE_1,USER_ADDRESS_LINE_2,CITY,STATE,ZIP_CODE)值(?,?,?, ?,?,?,?)DEBUG-完成插入集合:插入2行DEBUG-提交的JDBC连接DEBUG-HHH000420:关闭未发布的批处理DEBUG-释放JDBC连接DEBUG-已发布的JDBC连接DEBUG-HHH000031:关闭DEBUG-隐式破坏取消所有子ServiceRegistries信息的注册的ServiceRegistry信息-HHH000030:清理连接池[jdbc:mysql:// localhost:3306 / ifinances]调试-取消所有子ServiceRegistries的注册隐式破坏Bootstrap注册表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM