diff -r a328b91938b2 -r ea10572fccfe test/unittest_rset.py --- a/test/unittest_rset.py Thu Dec 04 11:37:10 2014 +0100 +++ b/test/unittest_rset.py Wed Dec 10 10:49:07 2014 +0100 @@ -563,6 +563,14 @@ self.assertIsInstance(str(rset), basestring) self.assertEqual(len(str(rset).splitlines()), 1) + def test_nonregr_symmetric_relation(self): + # see https://www.cubicweb.org/ticket/4739253 + with self.admin_access.client_cnx() as cnx: + p1 = cnx.create_entity('Personne', nom=u'sylvain') + cnx.create_entity('Personne', nom=u'denis', connait=p1) + cnx.commit() + rset = cnx.execute('Any X,Y WHERE X connait Y') + rset.get_entity(0, 1) # used to raise KeyError if __name__ == '__main__': unittest_main()