Pat the fish very dry and pulse in a food processor 10 to 15 times until it forms a slightly sticky, coarse paste. Do not over-process into a smooth puree, you want some texture left.
Transfer to a bowl and stir in the curry paste, fish sauce, egg, and cornstarch. Mix vigorously by hand or with a spoon for about a minute, until the mixture feels slightly springy when you press it.
Fold in the sliced long beans and kaffir lime leaves.
Stir together the cucumber, rice vinegar, sugar, shallot, and chili for the relish. Set aside to macerate for at least 10 minutes while you fry the cakes.
Heat the oil in a wide skillet over medium heat until it reaches about 325 to 350F. Test with a small piece of the mixture, it should sizzle gently and rise to the surface within a few seconds.
Using two spoons or wet hands, form the mixture into patties of about 2 tablespoons each, flattening to roughly 2.5 inches across and half an inch thick.
Fry in batches of 4 to 5 without crowding the pan, 2 to 3 minutes per side, until deep golden brown and cooked through. Drain on a wire rack.
Serve the fish cakes hot over the jasmine rice with the cucumber relish, cilantro, and lime wedges.