jsweet icon indicating copy to clipboard operation
jsweet copied to clipboard

Creating a DTO from the frontend doesn't have it's __dto_class as a property

Open jackymayo opened this issue 3 years ago • 0 comments


        const newFire = FireTaskDto.createFireReport( fireReasons.map(ordinal => FireReason[ordinal]),
            FireType[FireType.CLASS],
            fireNote,
            reporter,
            studentId,
            classroomInfo,
            )

// have to manually add this
        newFire['__dto_class'] = "com.ktbyte.dto.FireTaskDto";

        fireService.reportFire(newFire, result => {
            onToggle(false);
            setIsProcessing(false);
        })

This causes a problem when trying to render enums if there are Enums in the DTO Also tried calling FireTaskDto.new{} to see, looks like it doesn't add that either Screen Shot 2021-04-29 at 6 57 13 PM

jackymayo avatar Apr 29 '21 22:04 jackymayo