title: Ebean.delete() creates wrong SQL for many-to-many relation
body: <p>I have two simple Entities <em>Issue</em> and <em>Tag</em>, and a <code>many-to-many</code> relation between them. Everything works find except when I want to delete an <em>Issue</em> using <code>Ebean.delete(Issue.class, id)</code> which results in this exception:</p>
  
  <pre><code>javax.persistence.PersistenceException: Query threw SQLException:Unknown column
   'issue_id' in 'where clause' 
  Bind values:[1b7e5955c26b51dex546fca27x13cc54c2531x-7fef, ] 
  Query was:
  select t0.id c0 
  from tag t0 
  where issue_id=?  
  </code></pre>
  
  <p>The very strange thing is, that obviously the <strong>generated SQL is wrong</strong>. It tries to access an <code>issue_id</code> in the <code>tag</code> table but there is none. I hope this in no bug in Ebean but just a mistake of mine, but I have no idea what it could be.</p>
  
  <p>Here are the entity beans (I removed the getters/setters) and the DDL generated by Ebean:</p>
  
  <p><strong>Issue Entity</strong></p>
  
  <pre><code>@Entity
  public class Issue {
  
      @Id @Column(length=64)
      private String id;    // &lt;-- I use assigned ids
      @Version
      private Date timeStamp;
      private String title;
      private String description;
      private String createdBy;
      @CreatedTimestamp
      private Date createdAt;
      private String state;
      @ManyToMany(cascade=CascadeType.ALL)
      @JoinTable(
          name="issue_tag",
          joinColumns={@JoinColumn(name="issue_id", referencedColumnName="id")},
          inverseJoinColumns={@JoinColumn(name="tag_id", referencedColumnName="id")})
      private Set&lt;Tag&gt; tags;
  }
  </code></pre>
  
  <p><strong>Tag Entity</strong></p>
  
  <pre><code>@Entity
  public class Tag {
  
      @Id @Column(length=64)
      private String id;    // &lt;-- I use assigned ids
      @Version
      private Date timeStamp;
      private String name;
  
      @ManyToMany(mappedBy="tags", cascade=CascadeType.ALL)
      private Set&lt;Issue&gt; issues;
  }
  </code></pre>
  
  <p><strong>Generated DDL</strong></p>
  
  <pre><code>create table issue (
    id                        varchar(64) not null,
    title                     varchar(255),
    description               varchar(255),
    created_by                varchar(255),
    state                     varchar(255),
    time_stamp                datetime not null,
    created_at                datetime not null,
    constraint pk_issue primary key (id))
  ;
  
  create table tag (
    id                        varchar(64) not null,
    name                      varchar(255),
    time_stamp                datetime not null,
    constraint pk_tag primary key (id))
  ;
  
  create table issue_tag (
    issue_id                       varchar(64) not null,
    tag_id                         varchar(64) not null,
    constraint pk_issue_tag primary key (issue_id, tag_id))
  ;
  
  alter table issue_tag add constraint fk_issue_tag_issue_01 foreign key (issue_id) references issue (id) on delete restrict on update restrict;
  
  alter table issue_tag add constraint fk_issue_tag_tag_02 foreign key (tag_id) references tag (id) on delete restrict on update restrict;
  </code></pre>