i am currently making a website using spring and i stumble upon this basic scenario that i don\'t have any idea on how to solve this specific code: Entity = Optional;
The shortest way of doing this casting
RoomEntity roomEntity = roomRepository.findById(roomId).get();