Thanks to visit codestin.com
Credit goes to github.com

Skip to content

0.13.dev2 duplicate-attribute join issue #857

Description

@ixcat

Bug Report

Description

Testing 0.13.dev2 query engine yielded an unexpected exception when restricting on tables with duplicate fields

Reproducibility

>>> print(lab.Subject().definition)
   subject_id          : int   # institution 6 digit animal ID
   ---
   -> [nullable] Person        # person responsible for the animal
   cage_number         : int   # institution 6 digit animal ID
   date_of_birth       : date  # format: yyyy-mm-dd
   sex                 : enum('M','F','Unknown')
   -> [nullable] AnimalSource  # where was the animal ordered from
>>> print(lab.WaterRestriction().definition)
   -> Subject
   ---
   water_restriction_number    : varchar(16)   # WR number
   cage_number                 : int
   wr_start_date               : date
   wr_start_weight             : Decimal(6,3)
>>> lab.WaterRestriction() * lab.Subject().proj()
...
pymysql.err.OperationalError: (1052, "Column 'cage_number' in field
 list is ambiguous")

Expected Behavior

This previously allowed joining on the projected lab.Subject

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions