--- a/server/migractions.py Mon Mar 28 15:16:11 2011 +0200
+++ b/server/migractions.py Mon Mar 28 15:15:49 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
@@ -1372,6 +1372,18 @@
self.commit()
return entity
+ def cmd_find_entities(self, etype, **kwargs):
+ """find entities of the given type and attribute values"""
+ return self._cw.find_entities(etype, **kwargs)
+
+ def cmd_find_one_entity(self, etype, **kwargs):
+ """find one entity of the given type and attribute values.
+
+ raise :exc:`cubicweb.req.FindEntityError` if can not return one and only
+ one entity.
+ """
+ return self._cw.find_one_entity(etype, **kwargs)
+
def cmd_update_etype_fti_weight(self, etype, weight):
if self.repo.system_source.dbdriver == 'postgres':
self.sqlexec('UPDATE appears SET weight=%(weight)s '