Pronoun Case: When I was a child, Grandpa was unhappy with (me/my) excavating his rose garden in the hopes of finding dinosaur bones

I was answering an exercise on the internet when i come across this question:

When I was a child, Grandpa was unhappy with (me/my) excavating his rose garden in the hopes of finding dinosaur bones.

Based on the site, the correct answer is my, which is a possessive pronoun. I don't understand why we should use a possessive pronoun in this sentence. Please explain why. Thank you


Solution 1:

Taking a stab: We know that whatever comes after the word "with" has to be a noun, and essentially has to be the reason why Grandpa is unhappy. If Grandpa was just disgruntled by the person writing in first person singular, then "me" would suffice, but technically it is the action of excavating, or the nominalization of the verb, and so the possessive pronoun is more correct, since me is not a possessive pronoun. I am stretching my syntax knowledge here.

Solution 2:

When I was a child, Grandpa was unhappy with [(me/my) excavating his rose garden in the hopes of finding dinosaur bones].

Both forms are fine. The pronoun, either "me" or "my", is the subject, and the verb phrase "excavating his rose garden in the hopes of finding dinosaur bones" is the predicate.

The choice between gentitive "my" and accusative "me" depends on style, the genitive being characteristic of fairly formal style, and favoured by older speakers.

Since prepositions typically take a noun phrase as object, traditional grammar insisted that the so-called 'gerund' was correct by virtue of it being a 'verbal noun'. But those days are gone, and most people accept accusative "me" as a less-formal alternant.