Uploaded image for project: 'JBoss Developer Materials'
  1. JBoss Developer Materials
  2. JDF-391

Creation of Bookings fail in the generated TicketMonster scaffold

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • jdfsite-2.1.3.Final
    • ticket-monster
    • 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.

            vineet.reynolds_jira Vineet Reynolds (Inactive)
            vineet.reynolds_jira Vineet Reynolds (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: