How do they work in relation with the particles? Like for example わたしの知らないこと vs 私に分からないこと. I notice that the 知らない doesn’t really go with the particle に like in the other one. Why is that and do transitive verbs need to have an object in modifying clauses? Like comparing ケーキを食べる時間 for example, both 食べる and 知る are transitive, then why does 知る not have an object in modifying clauses? I understand it makes sense when you hear it, but I am not sure how it really works.
The noun phrase わたしの知らないこと is the result of replacing the placeholder in the following sentence with the noun こと and modifying it with the rest of the sentence.
What comes in the placeholder is the direct object of the verb 知る and therefore marked with を in the original sentence. However, when it is converted into a noun phrase, the particle that goes with the modified noun needs to be dropped.
The の in the noun phrase is because the subject marker が can be replaced with の in a noun-modifying clause as explained in the following question.
わたしが知らないこと is also grammatical.
The sentence that resulted in わたしに分からないこと is the following.
If you are not already familiar with these usages of に and が, you may want to take a look at the following questions.
This usage of に is uncommon, if not ungrammatical, with the verb 知る.
The が is dropped in the noun phrase for the same reason the を is dropped in the first example.
ケーキを食べる時間 is the result of replacing the placeholder in the following sentence, which expects a time expression (e.g. ３時), with 時間 and modifying it with the rest of the sentence.
The に gets dropped for the reason explained above, but the object marker を remains because it goes with ケーキ, not 時間.