Make the filling first, preferably 1-2 nights before you settle in to making the dough and assembling the knishes.
Heat a large pan over medium heat and add the butter and olive oil. Once the butter is melted, add the diced onions and stir to coat. Spread the onions out in the pan and turn the heat down to low.
Check the onions every 20 minutes or so, giving them a little stir as they caramelize. Do not be tempted to turn the heat up—you must be patient. The onions should be caramelized between 45 minutes to an hour, depending on your stovetop. If it takes longer, that's ok ... slow and low will give your onions a wonderful rich flavor.
Once the onions are about halfway through their cooking time, start on the potatoes.
Place the potatoes in a stock pot with cold water, enough to cover them, plus about an inch. Bring the water to a boil over high heat, then turn it down the medium-high, cooking the potatoes until tender (about 20 minutes).
Once the potatoes are done, drain them and then mash them. If you don't like your potatoes too lumpy, use a hand mixer for a couple minutes to smooth out the texture.
Sprinkle in the salt and pepper, stirring to combine. Add the cheese and the caramelized onions to the potatoes as well, and sample to see if you need a touch more salt.
The filling can be refrigerated for 1-2 days. If you intend to use it the same day you plan on baking the knishes, let it cool down to room temperature.
For the dough, combine the flour, baking powder and salt in your mixing bowl, whisking gently to combine.
Make a well in the middle of the dry ingredients and add the beaten egg, water, vinegar and oil.
Stir to combine (or if you're using a standmixer, fit it with the beater blade and mix until combined). The dough might be a bit shaggy and sticky, and that's fine.
Knead the dough for a few minutes, either by hand or with the dough hook. The dough will come together nicely, though it will be a little sticky.
Place it in a bowl and cover it, letting it rest for 1 hour, or refrigerate it up to 3 days.
When you're ready to assemble the knishes, first spread your work space with plenty of flour (and keep more on hand). Divide the dough in half, and begin rolling it out into a rectangle. Roll the dough out as thinly as you can, without tearing it.
Once you're satisfied with the shape and thinness of the dough, trim off any uneven edges.
On the edge closest to you, about half the filling about an inch up, and at least a 1/2-inch in from both sides, patting it into a tube that should be about 1 to 1.5 inches in diameter.
Pull the edge of the dough up and over the filling, and then roll it gently for 2 revolutions (you'll have 2 layers of dough around the filling). Trim off any excess dough from the far edge and place it back in the bowl with the remaining dough.
Gently pinch off the ends and measure out 3-inch sections. At each section, pinch and twist the dough (like making a sausage). Make a cut at each of these pinches.
Take the knish and make sure each end is well pinched together. Place the knish on the work table so that it's sitting upright on one of the end, and with the heel of your hand gently flatten it down to about 2 inches high, making it adorably squat.
On the top, dimple in the top pinched section with your finger. Repeat with the remaining knishes, and then repeat the entire process with the rest of the dough and filling (you may have a bit extra of both).
You can either refrigerate the assembled knishes for a day, or bake them after assembly.
When ready to bake, heat the oven to 375 degrees Fahrenheit.
Beat the egg and water together to make an egg wash.
Place the knishes on baking pans lined with parchment paper or baking silicone, about 1-2 inches apart.
Use the egg wash on each knish, brushing just a bit on. Sprinkle with salt.
Bake for a total of 45 minutes, rotating the pans about halfway through.
Once finished baking (and yes, some might burst open depending on how full your filled them or how tightly you rolled them), cool for 10-15 minutes. These are best eaten fresh, but will warm up nicely.