In my experience the only thing I think it will endure the dishwasher is the 2 part epoxi but that's toxic. I did use in my cup handle but I don't drink out of it. If its going to touch food I don't think you have a safe glue.
Edit: if there is plastic inside the metal you can try melting and bonding both. If its metal on plastic then forget it