Hi there,

We've run into a problem which boils down to inconsistent behaviour of 
elixir when creating tables.  This may seem a bit of an esoteric question 
to ask, but it affects our ability to test using elixir test classes.

I'd like to think this is a subtle bug, but maybe this is meant to work 
this way? If so, is there a way to coax elixir to do this consistently?

Here's an example using sqlite (but the same issue happens regardless of 
database backend):

When I have a class hierarchy like so:

class ClassA(Entity):
    using_options(inheritance='multi')

class ClassADerived(ClassA):
    using_options(inheritance='multi')

create_all() results in table (for ClassA) that looks like this:

CREATE TABLE __main___classa (
id INTEGER NOT NULL, 
row_type VARCHAR(40), 
PRIMARY KEY (id)
)

This is as expected. But, if I omit the derived class, and only have:

class ClassA(Entity):
    using_options(inheritance='multi')

The table creation statement fails to include the row_type column:

CREATE TABLE __main___classa (
id INTEGER NOT NULL, 
PRIMARY KEY (id)
)

-- 
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlelixir/-/itBItO6kAoQJ.
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