"pastel de feijão"

 Today we went by some cafe to have a coffe and to bite something. There was one cake named “pastel de feijão”. I would translate this like “Cake of bean” ..

I had eaten it and asked the woman behind the counter why it is named so, is it because some beans inside ? She’d  laughed at me and answered “Every cake has it’s name, this one just named “pastel de feijāo” and there is no feijāo inside… Well.. 

I know that “de” doesn’t meen only “made of” something….It also can be “from” etc or just point the name..

But how to make the difference ?  I mean for instance there is “salada de frutas”  and I’m sure that there are fruits inside :)))

Or no??