Minor change on object's id interval generation.

Added a method setCodesInvalidated() on DatabaseModel to force the code
invalidation of all objects

Minor fix on sample models.

Minor adjust on model export process to force the code cache
invalidation when using the unique name generation option.