Ticket #86 (closed defect: worksforme)
The handling of inherited columns with overridden column names is broken.
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Version: | |
| Keywords: | Cc: |
Description
I have been able to use Concrete Inheritance (totally cognescent of the caveat above), however there is one issue: I was using column renaming and properties to do validation more frequently than on a commit, and discovered that, although the columns exist in the child table, they are only available under the column name, not the parent class's field name.
class Event(Entity):
using_options(inheritance='concrete', tablename='__event')
_start = Field(DateTime, required=True, colname='start')
_finish = Field(DateTime, required=True, colname='finish')
There are then properties for start and finish...that use _start/_finish.
class Shift(Event):
using_options(inheritance='concrete', shortnames=True)
In this class, accessing _start/_finish will throw an error:
AttributeError: Concrete Mapper|Shift|shift does not implement attribute '_start' at the instance level. Add this property explicitly to Mapper|Shift|shift.
Removing the column renaming fixes the issue, but then I have ugly column names.
This bug relates to Ticket #10.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
