If a bankruptcy is listed on your credit report, it is not advisable to apply for a mortgage in your name. You may need to rely solely on your significant other to apply for the mortgage. Once your credit or credit report is all clear, the next step is to go to a mortgage broker who will pre-qualify you for a mortgage. The reason you want a broker and not a bank is that their rates will be the least expensive. The banks have rigid rules and have not adapted to the volatile mortgage market.
All mortgage brokers sell the mortgages on the open market.
You will find that no matter who owns your mortgage, it will eventually be sold on the open market. The current mortgage market will cause this to be the norm rather than the exception. There may be one or two very small local banks remaining, if there is still such a thing, who still keep all there local mortgages, but this is very rare because even the local banks must compete in the banking market to survive. If who owns your mortgage is important to you, then you must seek out that special bank. Remember the rate most likely will be higher and the qualification procedure more difficult.