解説がソースの逆を書いている?

Play! frameworkチュートリアルにある「A first iteration for the data model」において、mappedBy属性を使って一対多の関連を管理することをJPAに伝える部分について解説があります。

Note how we have used the mappedBy attribute to tell JPA that the Comment class’s post field maintains the relationship. When you define a bi-directional relation with JPA it is very important to tell it which side will maintain the relationship. In this case, since the Comments belong to the Post, it’s better that the Comment class maintains the relationship.

この段落の最後にある「it's better that the Comment class maintains the relationship」とありますが、CommentクラスはPostに従属するなら、CommentクラスではなくPostクラスが管理する方がベターなのではないのでしょうか。したがって、サンプルソースではPostクラスのcommentフィールドに「@OneToMany(mappedBy="post", cascade=CascadeType.ALL)」と書いてあります。

    @OneToMany(mappedBy="post", cascade=CascadeType.ALL)
    public List<Comment> comments;

なんか解説とソースが真逆になっているような気がします。これは、「it's better than the Post class maintains the relationship」でよいのではと。

[追記:5/18 8:57]
Play! frameworkのバグ管理サイトで報告しようと思ったら、既に同じようなことを他の方が指摘をなさってました。

これを読んで、私の読解能力に問題があり、この場合の「it's」はPostクラスのことを示し、訳せば「Postクラスの方がCommentクラスで関連を維持するよりも良い」となり、解説文に間違いはありませんでした。すみません。


また、この追記を書いている時、もう一つ間違えそうになりました。

we have used the mappedBy attribute to tell JPA that the Comment class’s post field maintains the relationship

というのを、以下のように誤解していました。

mappedBy属性を使用したことにより、Commentクラスのpostフィールドが関連を維持している
ことをJPAに伝えている
    ↓
Commentクラスが関連を維持している
    ↓
「it's better than the Post class maintains the relationship」ではないのか?←誤解

前述の引用部をもう少し丁寧に訳すと、

Postクラスのcommentsフィールドに@OneToManyアノテーションのmappedBy属性でpostを指定したのは、Commentクラスのpostフィールドが、PostクラスとCommentクラスの関連を維持していることをJPAに伝えるため

となり、したがって原文の「it's better than the Comment class maintains the relationship」でよいのだと。


英語、難しい...