DetachedCriteria dc = DetachedCriteria.forClass(classT, "p");
dc.add(Restrictions.eq("purePeptide", purePeptide));
dc.add(Restrictions.eq("project.id", projectId));
dc.addOrder(Order.asc("peptide"));
代ç 二:(x¨¬)
DetachedCriteria dc = DetachedCriteria.forClass(classT, "p");
dc.add(Restrictions.eq("p.purePeptide", purePeptide));
dc.add(Restrictions.eq("project.id", projectId));
dc.addOrder(Order.asc("peptide"));
两段代ç å”¯ä¸€çš„åŒºåˆ«å°±æ˜¯ç¬¬äºŒå¥æ˜¯ä‹Éç”?purePeptide"˜q˜æ˜¯"p.purePeptide"ã€?br>代ç 一产生的sqlè¯å¥åQ?br>select this_.purePeptide as y1_, this_.peptide as y2_ from SequestPeptide this_ where y1_ = 'NASILLEELDLEK' and this_.project_id=1 order by y2_ asc
˜q行ä¼?x¨¬)报Unknown column name:Y1_
代ç 二äñ”生的æ£ç¡®çš„sqlè¯å¥åQ?br>select this_.purePeptide as y1_, this_.peptide as y2_ from SequestPeptide this_ where this_.purePeptide='NASILLEELDLEK' and this_.project_id=1 order by y2_ asc

]]>