There is a "bug" in EntityDescriptor.setup_table in a section of code
which is adding column if polymorphic option is used. In my oppinion,
column shouldn't be added if it is already present. This way I can
manually create column and still use polymorphic.
For example:
if self.polymorphic and \
self.inheritance in ('single', 'multi') and \
self.children and not self.parent:
self.add_column(Column(self.polymorphic,
options.POLYMORPHIC_COL_TYPE))
Should be:
if self.polymorphic and \
self.inheritance in ('single', 'multi') and \
self.children and not self.parent and \
self.get_column(self.polymorphic, False) is None:
self.add_column(Column(self.polymorphic,
options.POLYMORPHIC_COL_TYPE))
Regards,
Tvrtko
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---