Closed bojanv55 closed 5 years ago
am I missing something here, or you don't need this check if (postTag.getPost().equals(this) ?
if (postTag.getPost().equals(this)
I guess you cannot add PostTag that has not this as inner Post, since only way yo do it should be addTag?
PostTag
this
Post
addTag
The check will cover the case when the both sides of the association were not properly synchronized. That's most likely why I had added that check.
am I missing something here, or you don't need this check
if (postTag.getPost().equals(this)
?I guess you cannot add
PostTag
that has notthis
as innerPost
, since only way yo do it should beaddTag
?