| hibernate 与 jdbc 共存需要注意的问题 | ||||
|
JDBC批量修改数据的地方注意清一下一级和二级缓存,其他就没有什么问题了。
| ||||
|
| ||||
| ||||
|
| ||
| hibernate3中如何获得到库表所有字段的名称 | ||||
|
Configuration conf =
new Configuration
(
);
conf. configure ( ); Iterator iter = conf. getTableMappings ( ); while ( iter. hasNext ( ) ) { Table table = ( Table ) iter. next ( ); System. out. println (table. getName ( ) ); Iterator ics = table. getColumnIterator ( ); while (ics. hasNext ( ) ) { Column col = (Column ) ics. next ( ); System. out. println (col. getName ( ) ); } } | ||||
|
| ||||
| ||||
|
| ||
| formbean和pojo之间的传值 |
|
方法:
BeanUtils.copyProperties(formbean, pojo);
注:需引入Jakarta-Common-BeanUtils 包。
|
本文探讨了Hibernate与JDBC共存时应注意的一级和二级缓存清理问题,特别是在批量修改数据时。此外,还介绍了使用BeanUtils进行Formbean与POJO间传值的方法。

4931

被折叠的 条评论
为什么被折叠?



