As a continuation to the threads I've started some time ago[1], now I will
tell you my experience, at least with SQLAlchemy.
It was really a PITA. All I can say it's SQLAlchemy inheritance support
sucks. At least I couldn't find a way to make relationships between
inherited classes (at least not without telling every little detail to the
mapper and hacking arround things, but in that case is easier to use just
plain SQL =).
I'm not saying SQLAlchemy sucks by itself, it has a bunch of great ideas
(I even took some of that great ideas and made SO behave a little like SA
on some aspects ;), and the performance it could be really better, but
defining a model is really a PITA. It took me 15 days to come up with
something more or less close to what I wanted, but finally I got stuck and
I had to drop SA. I've got the same results with SO (better in some ways,
like my model now it's working, and whorst in others, like I loose a little
performance) in just one day of coding. Ok, I had previous SO experience
and I had conectivity problems so I could't ask for help on the SA list,
but anyways, the SA version had twice the lines of code of SO, it's
just too complex and explicit.
I've got a lot of cyclic-dependency errors at first too, and it was very
frustrating, but eventually I realized that those errors were for my own
good. They made me think of my model in a more OO-way when using
collections.
I hope this could help any other people to decide what ORM to use on their
projects.
And I think TG don't have to switch to SA before it:
1) Support inheritance properly.
2) Gets a nice, good working, declarative mapper (like ActiveMapper or
TurboEntity)to avoid all the "overhead" (I had to define 3 "objects"
for each entity: table, class and mapper). This has to support 1).
PS. I'm not trying to troll SA, I really want SA to get better =) Avoiding
extra (and useless) id fields, single table inheritance and having real
"collections" as class attributes are great features, for example
(I've incorporated some of this concepts in my SO model). So I hope one
day I can use SA in a pleasant way ;)
[1]
http://groups.google.com/group/turbogears/browse_thread/thread/2c821b5c7cdf9451/#
http://groups.google.com/group/turbogears/browse_thread/thread/bee785f39e275177/#
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
.------------------------------------------------------------------------,
\ GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05 /
'--------------------------------------------------------------------'
Y2K
- what a disappointment... i had at least expected one nuclear plant to blow
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---