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 包。
|