title: A question about JPA Cascade and removing entity
body: <p>I have two entities called User and UserProfile in my data model. Here is how they are mapped.</p>
  <p>Code from User Entity:</p>
  <pre><code>@OneToOne(cascade=CascadeType.ALL)
  @PrimaryKeyJoinColumn
  public UserProfile getUserProfile(){
      return this.userProfile;
  }
      
  public void setUserProfile(UserProfile userProfile){
      this.userProfile=userProfile;
  }
  </code></pre>
  <p>Code from UserProfile Entity:</p>
  <pre><code>@OneToOne(mappedBy=&quot;userProfile&quot;,cascade=CascadeType.ALL)
  public User getUser(){
      return this.user;
  }
  
  public void setUser(User user){
      this.user=user;
  }
  </code></pre>
  <p>As you see, I have a <code>CascadeType.ALL</code> for the user attribute in UserProfile. But when I try deleting the UserProfile entity, the corresponding User entity still stays. (When I try deleting the User entity, the corresponding UserProfile entity gets deleted.)</p>
  <p>Here is my question:-</p>
  <ul>
  <li>Do cascades hold only when I specify them on the entity owning the relationship?</li>
  </ul>