-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
jdfsite-2.1.3.Final
-
None
The following error message is reported when attempting to save a new Booking in the generated TicketMonster scaffold:
Validation failed for classes [org.jboss.jdf.example.ticketmonster.model.Booking] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be empty', propertyPath=tickets, rootBeanClass=class org.jboss.jdf.example.ticketmonster.model.Booking, messageTemplate='{org.hibernate.validator.constraints.NotEmpty.message}'} ]
Although the tickets field is visible, one cannot choose existing Tickets nor create new ones in the Create Booking screen. This is because the generated Forge scaffold does not contain the correct code for immutable entities like Ticket. Forge scaffolding assumes that related collections in a scaffolded entity are not immutable.
Additionally, since the tickets collection cannot be null, a booking cannot be saved without a ticket, and hence this cannot be worked around without modifying the Forge scaffolding correctly.
- is blocked by
-
FORGE-972 The generated Faces scaffold contains functional errors for entities with immutable properties or collections of immutable properties
- Open