Skip to content

Type inherited from reflected type have incorrect tname set #956

@dnwpark

Description

@dnwpark

Using the orm_qb schema, the following code:

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:

[
    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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ORMbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions