Meghan Trainor is coming to Jennifer Lopezs defense after it was revealed that Dr. Luke produced her latest hit, Aint Your Mama. Dr. Luke is currently been sued by Kesha  who claims he

Despite being slammed by other top singers like Adele, Kelly Clarkson and others, J.Lo's debut 2016 hit track shows he can still get work  making beats for high-profile pop singers.

In  her new interview with Digital Spy, co-write to 'Ain't Your Mama', Trainor says Lopez  had no idea who was behind the beats when she agreed to do the song.

READ: Iggy Azalea pours support to Kesha amid legal drama

"I texted her the song and she had no idea. She thought I did it alone by myself at my house, which a lot of people think because I do do that,” said Trainor. "I sent it to her and said, ’Do you like the song?’ and she said, ’I love the song, my kid loves the song — he’s made me play it five times already so I know it’s a hit. When can I cut it?’, so I said immediately, ’Whenever you want!'"

As for the controversy around the track, Trainor added, "I felt terrible when Jennifer got all the hate for [’Ain’t Your Mama’], and it’s just all ridiculous. It’s such a big song for her."

READ: Record label asks Kesha to apologize to Dr. Luke over rape allegations

According to MTV, Trainor may not have sort Luke out for 'Ain’t Your Mama' herself; she’s signed to Epic Records, which is owned by Sony, just like Luke’s Kemosabe Records is.

Watch Jennifer Lopez perform 'Ain't Your Mama' on American Idol final season below: