title: Generic Generator parameters in Hibernate cannot be set
body: <p>I want to use foreign strategy generator for one of key properties in my class. The easiest way as shown in:
  <a href="http://blog.eyallupu.com/2011/01/hibernatejpa-identity-generators.html" rel="nofollow noreferrer">http://blog.eyallupu.com/2011/01/hibernatejpa-identity-generators.html</a>
  or
  <a href="http://www.coderanch.com/t/219256/ORM/databases/HBM-Annotation-Foreign-Generator" rel="nofollow noreferrer">http://www.coderanch.com/t/219256/ORM/databases/HBM-Annotation-Foreign-Generator</a>
  or
  <a href="http://www.mkyong.com/hibernate/hibernate-one-to-one-relationship-example-annotation/" rel="nofollow noreferrer">http://www.mkyong.com/hibernate/hibernate-one-to-one-relationship-example-annotation/</a></p>
  <pre class="lang-java prettyprint-override"><code>import java.util.Date;
  import java.util.HashSet;
  import java.util.Set;
  
  import javax.persistence.*;
  import org.hibernate.annotations.GenericGenerator;
  ...
  ...
  ...
  @GenericGenerator(
          name = &quot;myForeignGenerator&quot;,
          strategy = &quot;foreign&quot;,
          parameters = @Parameter(name = &quot;property&quot;, value = &quot;osoba&quot;))
  @Id
  @GeneratedValue(generator = &quot;myForeignGenerator&quot;)
  @Column(name = &quot;IdPracownik&quot;, unique = true, nullable = false)
  public int getIdPracownik() {
      return this.idPracownik;
  }
  </code></pre>
  <p>and Eclipse shows error:</p>
  <p><em>&quot;Type mismatch: cannot convert from Parameter to Annotation&quot;</em>, underlining &quot;@Parameter&quot; annotation.</p>
  <p>Why is that?</p>