On Tue, Feb 3, 2009 at 21:27, Tvrtko <[email protected]> wrote:
>
> 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.

It's a sane suggestion and I would like to honor it, but this could
lead to a potentially confusing behavior if people add a column named
"row_type", it's silently accepted, but then it's used behind their
back as the polymorphic column.

There ought to be a way for the user to tell "I know what I'm doing",
and an option only for that seems way overkill. Maybe the following
scheme would do:
split the polymorphic option into
* polymorphic: a simple boolean, True by default
* polymorphic_col: the name for the polymorphic col. The option would
default to None, and if it's not the default name ("rowtype") would be
used. Using a manually defined column would only work if the column
name was set manually.

I'm not really happy with this scheme either since it is a bit complicated...

-- 
Gaƫtan de Menten
http://openhex.org

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to