Closed LKASTI closed 3 months ago
Decided to not use DTO pattern, and created a method that takes all needed fields for creating an Event, including fields for an Appointment and Location. All fields are sent as request parameters, in which they are converted into objects in the event service file. Each object is created and flushed to the database in order to preserve relationships amongst entities.
This is method seems to be working, although not all test cases were checked. Currently, it is being changed by Jonathan to reflect modularization changes.
Looks like I forgot to add the description
field to the method parameter list. This will need to be added.
tracked in #85
Resources: https://www.baeldung.com/java-dto-pattern
The front-end form should contain the following information when an event is being sent to the back-end:
DTOs: EventCreationDTO
An outside example of a DTO in use: