01 2014 档案
摘要:一.查询全部对象属性的封装则比较简单Queryquery=this.getSession().createSQLQuery(queryString).addEntity(pojoClass);Query query = this.getSession().createQuery(queryString);二.查找部分属性1.使用SQLQueryQuery query =this.getSession().createSQLQuery(queryString);然后对查找的结果循环转化为Map 然后再map.get(???),set进User user =new User();最后list.ad
阅读全文
摘要:这种查询,hibernate 建议用 From Dealer s inner join fetch s.carSerieses cs 实现,注意这种实现只支持b.c,不支持b.cs. 如果要用b.cs功能,用子查询代替 使用时注意:多对多后面如果还有1对多,那么后边的使用子查询. ----上面要强调一点,1对多查找中,如果没有其他的制定条件,那么别用Left join.(用2天测试出来的结果,请相信.)如果直接通过sql写,只有通过 where a.id=x.aid and x.bid=b.id; (=两边写法=) a inner join x on a.id=x.aid inner j...
阅读全文
摘要:var ids =[];for(){ ids.push(???);}//alert(ids); 弹出来的是a,b,c,d我们发送请求的时候还要拼接var data ="";for(i=0;i<ids.length;i++){ data+="&ids="+ids[i];}//alert(data); 弹出的是&ids=a&ids=b&ids=c这样发送请求.貌似很牛X的写法,其实还不如我直接用&拼接,写法好.
阅读全文
摘要:1.一级父节点 parent() n级父节点 parents(???).2.一级子节点 children()n级子节点 用find(???)
阅读全文
摘要:public static String CLASS_PATH =Info.class.getResource("").getPath();
阅读全文
摘要:$(this).offset().top;
阅读全文
摘要:String path = request.getContextPath()+"/";String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path ;
阅读全文