edgedb / edgedb-python

The official Python client library for EdgeDB
https://edgedb.com
Apache License 2.0
369 stars 45 forks source link

Bindings get confused if a linkprop and a regular prop have the same name #377

Closed msullivan closed 2 years ago

msullivan commented 2 years ago

If you do something like this (on the cards test db)

v = db.query('''
    select User { deck: {@count, count := 10} }
''')

then v[0].deck[0].count will produce

'edgedb.Object' object has no attribute 'count'
fantix commented 2 years ago

379 didn't fix this - because the key in RecordDesc is overwritten by another. The right fix would be to prefix the key of link properties in RecordDesc directly. I'll create a PR soon.