Mostly when collecting miles with legacy carriers in one of the big three alliances, things are very clear: if the operating carrier is in the alliance, the marketing carrier and ticketing carrier will be too, and you can collect miles with the programme of your choice within that alliance. So if I use Finnair to book a journey with BA flight numbers on JAL and BA aircraft, I can collect BA miles with that flight.
Now, I ran across an interesting problem that I was not able to solve reading the guidance of British Airways Executive Club (my loyalty programme):
When flying from East Asia to Germany using OneWorld, I generally have the choice between Finnair, British Airways, JAL and sometimes Cathay Pacific or Qatar. This time, the CX flights seemed appealing price-wise. On the intercontinental leg HKG–FRA, Cathay Pacific offers two flights: one operated by themselves and the other operated by Lufthansa. Obviously, if I take the CX flight, it’s all fine and I accrue miles. But what is the case if I take the Lufthansa flight, where there is a clash of alliances?
In short, can I accrue BA miles if Cathay Pacific is my ticketing and marketing carrier but Lufthansa is the operating carrier?