I presume you are regulating the battery supply down to 3.3V. A pair of ideal diodes wont do what you want reliably as the supply with the fractionally higher voltage always 'wins'. e.g. if 3v3in=3.30V and 3V3batt=3.31V, it will never draw current from the 3.3V input, so will flatten the battery.
What you actually need ts a circuit that monitors the 3.3V input, and if present connects it to the load via a mosfet and simultaneously disconnects the battery via another MOSFET, or possibly by disabling the battery 3.3V regulator via its enable pin, (but that regulator must then tolerate 3.3V on its output when disabled - check datasheets carefully).