I'd have to agree that the initialization mechanism could use some work.
One of my bigger gripes about the initialization process is that a single bad mapping file makes all of the other mappings in the same configuration unusable. It would be nice to have the option to "ignore invalid mappings", possibly with the option to register a listener during the initialization.
That way only persistence operations operating on the improperly mapped class/table would fail.
Note that while this problem is a minor pain during development, it is a much more significant problem in production. For example, if one of the databases you map to makes a minor schema change renaming a column in an obscure table used by only 1% of your application functionality, it can cause your entire application to be broken and force you to scramble to release an emergency patch. (True, it would be nice if schema changes weren't made without notifying your application, but unfortunately, this is not always the case in corporate environments.)
|