hibernate
小汤姆@谭
正在成长的路上
展开
-
ehcache.xml配置说明
转载来源<!-- 设置缓存的默认数据过期策略 --> <defaultCache maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true" ...转载 2019-03-23 11:43:15 · 269 阅读 · 0 评论 -
hibernate hql语句使用1
public void delete(Integer id){String hql = “DELETE FROM Employee e WHERE e.id = ?”;getSession().createQuery(hql).setInteger(0, id).executeUpdate();}public List getAll(){String hql = “FROM Employ...原创 2019-04-07 20:03:21 · 158 阅读 · 0 评论 -
hibernate 多对多(set, list)
原创 2019-04-07 21:23:53 · 307 阅读 · 0 评论 -
hql_count 统计总数
String hql = “SELECT COUNT(*) FROM BookCar WHERE bookId = ? AND carId = ?”;Query query = getSession().createQuery(hql).setInteger(0, bookId).setInteger(1, carId);return ((Long) query.iterate().next(...原创 2019-04-09 16:51:45 · 2994 阅读 · 1 评论 -
ehcache.xml
<ehcache><!-- Sets the path to the directory where cache .data files are created. If the path is a Java System Property it is replaced by its value in the running VM. The fo...原创 2019-04-23 15:40:22 · 258 阅读 · 0 评论