geldata / geldata/gel-python

Type inherited from reflected type have incorrect tname set

Open
#956 0 comments 0 reactions 0 assignees View on GitHub
bug ORM
Dominant language
Python
Stars
415
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Using the `orm_qb` schema, the following code:
```py
from models.orm_qb import default, std

class Inh_A_WithComputed(default.Inh_A):
n: std.int64

result = self.client.query(Inh_A_WithComputed.select(n=lambda x: x.a + 1000))
```

Will produce results like:
```py
[
Inh_A_WithComputed(id=..., tname__='default::Inh_A', n=1001),
Inh_A_WithComputed(id=..., tname__='default::Inh_A', n=1017),
Inh_A_WithComputed(id=..., tname__='default::Inh_A', n=2001),
Inh_A_WithComputed(id=..., tname__='default::Inh_A', n=1013),
Inh_A_WithComputed(id=..., tname__='default::Inh_A', n=1007),
Inh_A_WithComputed(id=..., tname__='default::Inh_A', n=1004)
]
```

The values of `tname__` should include `Inh_AB`, `Inh_AC`, etc.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.