"Mai Pen Rai" is Thai for "no problem", which pretty much sums up this framework! Why should Java Object and Relation Persistence require so much work?
MaiPenRai is a fully automated framework. All you have to do is to provide the database connection url and SQL dialect. Then you simply let your Java domain objects inherit from a class provided by the framework. Then you're done. You may store, retrieve, delete or search for your objects. There are no mapping configuration files. No SQL is required, tables and rows are created or updated on demand.
Despite this, there is no magic involved, the mapping is quite easy to understand. Tables are named after the corresponding classes. Columns are named after corresponding fields. Each object is given a unique id, identifying the class and object instance. This id is used for mapping object relations and runtime resolving the actual class an object refers to, thus fully supporting inheritence as well.
You still have the option to write specialized SQL statements or stored procedures towards the generated tables. In short, the framework doesn't inhibit you in any way, it just takes care of all that mundane mapping in the easiest possible way.
Another key feature, that is not yet fully implemented, is refactoring support! One of the major real-life problems with object / relational mapping is that the two models tend to migrate in different directions over time. With this framework that is not possible, the models are simple too tightly coupled. So a central feature of the framework will be to provide a mechanism for refactoring of the database. See the roadmap for details about when to expect this feature.
See the roadmap page for details about planned features.
Do you like what you see so far? But the framework lacks that one killer feature that you've always wanted? Or perhaps doesn't support your favourite database? Get involved! Contact the author (see mail address below).
In particular, I'm looking for people
Send questions, comments, suggestions for improvements to Steinar Haugen, email@example.com.