On Sun, Jul 25, 2010 at 17:51, Michael Hipp <[email protected]> wrote:

> I'm embarking on a sizable project and need to make some decisions early on.
> Question...
>
> Is there any downside to using Elixir vs. straight SQLAlchemy?
>
> I sure look like the look of Elixir's model definitions vs. having to write
> everything twice in SA.
>
> Just hoped someone might be brutally honest if there's something I might
> regret if I use Elixir.

Well, the biggest technical downside for the latest stable release
(0.7.1) is the fact that not all types of interaction are allowed
between Elixir and pure SA, specifically, you can't have a ManyToMany
relationship pointing to a pure SA class. That particular limitation
will be lifted in 0.8 (I got experimental code for it in my copy) and
if anybody needs it badly, I might even release 0.8 early (and
postpone other improvements slated for 0.8).

Except from that, there are very few *technical* limitations. You
might want to have a look at the bug tracker to get an idea of them.
However, the argument I most often hear against Elixir is that it
makes debugging in case there is a problem somewhat harder, because
you have to know where the problem came from, and people do not always
find obvious what Elixir generated for you. The thing is the *default*
rules (many things are configurable) for that are pretty simple:

ManyToOne = add a Column in table with a foreign key to the remote
table's primary key + a relation in the mapper
ManyToMany = create an intermediary table (2 columns with foreign keys
to each related table) + a relation in the mapper
OneToMany & OneToOne = add a relation to the mapper

All in all, the deciding factor is usually: do you appreciate enough
having some columns and some tables (Intermediary tables for
ManyToMany) being (optionally) generated for you, that you are willing
to pay a potentially longer debugging time for it? If not, then do not
use Elixir, and use "declarative" (SQLAlchemy's builtin extension)
instead.

Hope it helps,
-- 
Gaƫtan de Menten

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