Creating models with immutable attributes