How to make apple pie stay intact
I'm not quite sure what you mean by having the filling 'stick' to the crust, but if you mean that the filling slides out, then you probably haven't added enough thickener (usually flour or cornstarch) to your apples, so the juices that leak out during cooking are too thin.

Different brands and batches of flour/cornstarch, and different apples, will have different levels of liquidity - a bit of practice and experience is necessary to get consistent results.