Changes to the existing API
With MetaModel 3.0 we now offer a full set of CRUD operations on your datastores! This means that in addition to querying and inserting records, you can now also update records and delete them.
The UPDATE and DELETE operations can be fired on all UpdateableDataContext implementations, which currently include:
In MetaModel 3.0 you're also now able to create and drop tables at runtime. For instance, you can use it to create temporary, but persistent tables, or dynamically fit your data model at runtime. Doing so is done using the executeUpdate(...) method on any of the UpdateableDataContext implementations, which currently include:
The notion of a 'table' differs a bit in these datastores, so take a look at the Schema and table semantics page for a full overview.
We have a brand new module in MetaModel 3.0 which offers CouchDB support! Now you can query and update your CouchDB database just like you would query any regular database.
Another new module in MetaModel 3.0: Java object support (aka. the POJO module). While this might not seem so impressive at first, it is actually quite useful. You can use for instance for unittesting purposes or to allow users to test-drive your data flows using simple in-memory data.
MetaModel is now aware of primary keys. Obviously this is extremely important when dealing with UPDATE and DELETE operations. Therefore you will find two new methods: Table.getPrimaryKeys() and Column.isPrimaryKey().
With the widening of the support for NoSQL datastores like MongoDB and CouchDB, we've seen a need for new column types. We've introduced LIST and MAP for this purpose. They map to java.util.List and java.util.Map and allow for these datastore types to represent the full documents contained within them.
An important API change for MetaModel in order to improve consistency with other similar libraries: We've changed the row number concept from a 0-based index concept to being a 1-based row number concept! This was done in order to comply with typical usage of row numbers in eg. SQL LIMIT clauses, Spreadsheet applications, the JPA specification and more.
On the down-side, this means that the semantics have changed for a number of methods or classes:
We encourage you to check your usage of these methods or classes before upgrading to MetaModel 3.0. Make sure you switch from a 0-based to a 1-based approach when using them.
The operator types HIGHER_THAN and LOWER_THAN have been deprecated. Use the new GREATER_THAN and LESS_THAN instead.
We've made it possible to construct a SelectItem with a reference to a specific FromItem which means that in case you are referencing the same table multiple times in a query, you can then pinpoint which one a specific select item references.
The logging level (especially for the JDBC module) has been moderated to not include as much information in the INFO level as before. This means that you will no longer get eg. the full SQL query in the INFO level, which is an improvement for the security of INFO-logged applications.
The method DataSet.toTableModel() has been deprecated, and we plan on removing it entirely from version 3.1. This is to prevent any hick-ups in environments where the javax.swing package is prohibited (eg. in some OSGi environments) or even not existing (eg. in future Java 8 Jigsaw-based deployments). Users of the method are encouraged to use the class DataSetTableModel instead, which yields the same result.
An issue with retreiving JDBC boolean values was discovered and fixed.