diff -r 7b95eae7669d -r 0df931eb08de test/unittest_rset.py --- a/test/unittest_rset.py Mon Feb 02 12:32:07 2015 +0100 +++ b/test/unittest_rset.py Thu Feb 05 15:49:02 2015 +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()