[forge-dev] Scaffolding immutable JPA entities

Vineet Reynolds Pereira vpereira at redhat.com
Mon Jun 24 19:23:47 EDT 2013


Hey all,

   FORGE-917 <https://issues.jboss.org/browse/FORGE-917> was fixed a few days back where in immutable classes were excluded from the generated scaffold, i.e. no create,search,update screens were generated for such classes.

   I've run into a related problem where other JPA entities are composed of one or more immutable types. The generated scaffold does not allow creation of the constituent immutable types (obviously) along with the root JPA entity. Additionally, if these root JPA entities contain Bean Validation constraints on the immutable types, then creation or updation of these entities would fail depending on what constraints are imposed.

   I think this scenario demands that this limitation be documented with possible approaches to resolve this issue. Obviously, it makes little sense to also prevent scaffolds from being generated for JPA entities composed of immutable types. Also, this makes revisit FORGE-917 - should we revisit the design of the generated managed (view)beans to support immutable types?

   What do you think?

Vineet


More information about the forge-dev mailing list