ActiveRecord in Qt
I wonder if someone has created a library that uses ActiveRecord’s pattern in Qt.
We have created a similar approach in one of our projects. Instead of saving in a database directly, we use some hand-crafted XML to push the data to java based server application that does the actual db operations.
Unfortunately I cannot post source code, as this is a closed source project.
To be flexible, one might consider adding a wrapper level between the objects and the database or provide a kind of database driver for getting and submitting the data to a remote server.
For those who are not familiar with the concept: A short descripton of ActiveRecord on wikipedia [en.wikipedia.org].
Hey, thanks. That would really help me.
I was thinking in making an ActiveRecord library of my own, just to satisfy the needs of my project.
But I just thought that would be better to adapt an existing project, don’t you think?
Anyway any help and examples would be appreciated.
I really like the Ruby ActiveRecord’s API [ar.rubyonrails.org].
I have a concept mail to the qt mailinglist hanging around with thoughts about this issue. I really think something like this is needed, but it needs to be Done Right ™. ORM frameworks for Qt that I know of are QDjango, QsT SQL Tools, QxOrm and QtPersistence. None of these seem to fit my bill, but there are interesting ideas in some of them.
Heard about couple of qt projects that provides orm functionality. I will find them and post back
But I do not know anything about it’s quality.
ORM. ORM lives better in Java and Net :)But my opinion is that C++ is not a good choice for
IMHO, you don’t choose a language just for building an ORM. You use an ORM as part of your application for which you have chosen a language. If you choose Qt, then you have already chosen C++ in most cases.
Back to the issue in question: an ORM for Qt.
Dennis: what specific issues was QsT SQL Tools designed to avoid?
Andre, I didn’t use it, but I’ve read QsT maintaners article about it. He said that it was designed to make library users live easier. Also he said that it is not an ORM in common, it is something that is near to ORM. There are some problems witch caching, relations support (QxOrm will be the best in this case), full sql support.