Jonathan-

It looks like we indeed do ignore the columnNames field of the index. This is a bug, and I've entered it at:

  https://issues.apache.org/jira/browse/OPENJPA-223

I don't think there is a workaround, unless the index is unique, in which case you can use the JPA standard javax.persistence.UniqueConstraint annotation on the @Table annotation (which allows you to specify multiple columns, and which we appear to respect).



On Apr 18, 2007, at 11:56 AM, Jonathan Feinberg wrote:

Is there any way to cause the OpenJPA schema builder to emit an index across multiple columns? My attempt,
 @Column(columnDefinition = "bytea")
 @Index(name = "i_owner_md5", columnNames = { "owner_id, md5" })
 public byte[] getMd5()
 {
  return md5;
 }
is silently misinterpreted, in that only the annotated field (md5) gets indexed.

Thanks,
--

Reply via email to