SimpleORM offshoot

"Brian Hawkins" <[email protected]>
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
I read about SimpleORM a few years ago in a java magazine and I liked what I
saw.  I've taken a look at Hibernate and I was very afraid :)

I've always been of the opinion that tools do not have to be themselves
complicated just because they may do a complicated task.

Anyway I've used SimpleORM in a large project and was very pleased with the
outcome.  There are however a couple of issues that have bugged me.
The first is casting:
Employee e = (Employee)Employee.meta.find(bla);

This seems very clunky to me.

The other issue is that SimpleOrm does not have a mechanism for handling
complex queries.  In one case I have a query that joins data across 10+
tables.

So I created a new project called GenORMous where I took all of the coolness
from SimpleORM and made it (IMHO) better.  At this point I have to mention
how cool it is putting the connection on the thread local data, that works
so well with inversion of control frameworks such as Struts2 (very cool
feature).

Back to GenORMous, it is basically SimpleORM but with generated code so in
the above scenario I can to this:
Employee e = Employee.factory.find(bla);

Because the static factory object is generated, it knows what kind of class
it creates.  Also I can generate key specific find and create methods for
tables with multiple key fields such as:
Employee e = Employee.factory.find(intkey, stringkey);

It removes all ambiguity and improves compile time error checking.

As for complex queries GenORMous generates readonly dataset objects for
accessing the query results.

It's all very cool and I'm interested in what you guys think.

(http://code.google.com/p/genormous/)

thanks
Brian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.