id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
43	Multitable table polymorphic inheritance clashes with autoload	guest	ged	"Autoloading classes with polymorphic multi table inheritance fails during setup.

Create the database:
{{{
sqlite3 test.sqlite 'CREATE TABLE __main___fish (id INTEGER PRIMARY KEY , row_type VARCHAR(40)); CREATE TABLE __main___pike (fish_id INTEGER PRIMARY KEY REFERENCES __main___fish (id));'
}}}

Test it with:
{{{
from elixir import *
metadata.bind = ""sqlite:///test.sqlite""

options_defaults[""polymorphic""] = True
options_defaults[""autoload""] = True
options_defaults[""inheritance""] = ""multi""

class Fish(Entity): pass
class Pike(Fish): pass
setup_all()
}}}

A simple workaround to make it work is to insert another setup_all() between the class declarations:

{{{
class Fish(Entity): pass
setup_all()
class Pike(Fish): pass
setup_all()
}}}"	defect	closed	normal	0.6	core	0.5.0	fixed	polymorphic multi table inheritance	
