--- a/entity.py Thu Nov 12 12:08:43 2009 +0100
+++ b/entity.py Thu Nov 12 12:15:19 2009 +0100
@@ -778,9 +778,13 @@
rqlexprs = rtype.get_rqlexprs('add')
rewriter = RQLRewriter(self.req)
rqlst = self.req.vreg.parse(self.req, rql, args)
+ if not self.has_eid():
+ existant = searchedvar
+ else:
+ existant = None # instead of 'SO', improve perfs
for select in rqlst.children:
rewriter.rewrite(select, [((searchedvar, searchedvar), rqlexprs)],
- select.solutions, args)
+ select.solutions, args, existant)
rql = rqlst.as_string()
return rql, args