SQLObject forces you to embed "database code" into your model classes,
and i don't really want that. And it's really buggy! Too much for
production usage.
SQLAlchemy lets you define separately DB code and python classes, but
then you hve a real duplication. And to use database functionalities
you always need to access session objects or connections, making
sql-like queries. And i don't want that.
Thy're both good projects but none of them has catched the real
objective: no more sql within the application logic. Hibernate does it,
take a look!
Anyway, maybe i didn't look so much into python world and there could
be other tools, or other ways of using these tools for doing what i
want to, please let me know if you know of any!!
Bye
Using "assign_mapper" rather than "mapper" is the solution to this?
sanjay
for example.. usage complaints as relates to session, are typically
things that can be handled by app server, via app agnostic appserver
integration. sa exposes various session/txn layers for application
flexibility and for easier integration into frameworks or different
programming styles, in much the same way that hibernate does, and
arguably sa is more flexible here for different usage modes (although
hibernate's scaling/deployment options, ie. caches are much nicer).
cheers,
kapil
Unless Hibernate has changed almost entirely in the past two years
(when I was last using it), you used session objects to control which
of your objects were currently being managed by the ORM and you used
OQL to query the database. I'd certainly be interested to see some
examples of how it works now to see how it has changed...
Hibernate is pretty SQL oriented as well, and as I use it every day for
my job I can say it has little to nothing over SA...harder to
configure, more complex and less consistent behavior with regards to
relationships, poorer database support (like forget about quoting and
stuff), its "create schema" support sucks, no reflection, only one
"eager loading" relation at a time, no union-based polymorphic loading,
self-referential relationships are barely supported, and of course its
very hard to integrate plain SQL/result set logic with it since its
only an ORM. the only compelling features it has over SA are "extra
lazy loading" and a second-level cache, which while ive used neither,
could be implemented for SA someday.
Sounds like you should port SA to Java so you can use it in your day job :)
Kevin
Python fails in this discipline mainly due to:
* the lack of collaboration between projects (mainly
'single-developer' centric)
* user feed back is not tacke nin account as it should
http://case.lazaridis.com/wiki/Persist#Requirements
the first major problem of this rewrite:
it happens 'silently' (non-public)
.
its not your grandfather's open source community !
SQLAlchemy lets you define separately DB code and python classes, but
then you hve a real duplication.
If you're responding to Ilias Lazaridis's comment, you should be aware
that he appears to be a troll. His post set off all my "trolling post,
ignore" sensors, plus I've seen him before. (Here, several months ago,
if I recall correctly). Incidentally, there used to be a Wikipedia
article on him, which was recently deleted. But you can still see it
via Google's cache, at:
I wasn't going to say anything unless someone responded to him, but in
the interests of pro-actively heading off a possible flamewar:
Please Don't Feed The Trolls. :-)
--
Robin Munn
Robin...@gmail.com
GPG key 0x4543D577