Daniel Fetchinson schrieb:
>>> Will SO be on equal footing with SA in tg2? Meaning, anything that
>>> works with SA (dbsprockets, dbmechanic, authentication, etc) will work
>>> with SO too? If yes, what is the timeline for this, I mean what tg2
>>> release is expected to achieve this?
>> The short answer is if somebody steps up and decides to make it so,
>> that will happen.   But honestly I don't think it's that likely.
>> We'll almost certainly have some SO support added to TG2 so that we
>> can provide backwards compatibility, but I expect us to remain focused
>> on SA rather than SO.
>>
>> SA has a new "declarative" interface which helps span the difference
>> between SA and SO, so hopefully that will provide a good stepping
>> stone.   But I think that all the momentum in the python ORM world is
>> SA focused.
> 
> That's quite clear and reasonable. Did anyone do an SO -> SA migration
> on a large project? How painful was it?
> 
> I understand that with elixir the declaration of the model is simple
> but if I have already everything coded up in SO I'm afraid I'll have
> to rewrite everything. Meaning that the way custom queries are built
> (I use currently sqlobject.sqlbuiler, with SA it will probably be
> totally different), the way selects are done ( model.Person.select(
> model.Person.q.name=='Tarzan' ) I assume totally different syntax for
> SA), etc, etc, in other words I'm afraid one has to rewrite every
> single line of code that touches the db.
> 
> If somebody did the SO -> SA migration recently maybe he/she can give
> some advice.

I happen to do so in the last few days, by using Elixir to replace a 
moderately complex model with n:m (even bidirectional) relationships + 
custom queries in some model methods.

The hardest part was the setting up of all the 
metadata/engine/session-stuff properly, for multi-threading and stuff.

Thes second hardest was the introduction of session.flush()-calls every 
now and then, as SA tries to aggressively optimize, and that causes 
sometimes problems. autoflush doesn't mitigate these.

The queries (so far) were easy enough to rewrite.

And wort mentioning of course: having everything unit-tested helped 
*tremendously*!

All in all I must say that while I'v been an active SO-user and even 
committer, the code-base of SA & Elixir seems more abstracted and 
maintainable & certainly comes with *much* more features. So in the long 
run, you might benefit.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to