[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.jsr220-orm] Could not determine type for: [...], for columns: [...]

I'm not sure if it's a bug and if I must send it to bugzilla...

I have a simple class with a member:
@Entity(access=AccessType.FIELD)
public class Customer
{
  [...]
  private int customer_id;
  [...]
}

I used the jsr220-orm plugin to define the primary key with this field:
@Id(generate=GeneratorType.IDENTITY)
private int customer_id;


OK, nice... then I run my main class but I got an exception...

the line wich raise the exception :
factory = Persistence.createEntityManagerFactory("mycontext");


the exception :
Caused by: org.hibernate.MappingException: Could not determine type for: org.mk.model.Customer, for columns: [org.hibernate.mapping.Column(CUSTOMER_ID)]



I tried to change the type of the field to have something like that : @Id(generate=GeneratorType.IDENTITY) @Column(jdbcType=Types.SMALLINT) private int customer_id;

But now, it makes an error :
The attribute jdbcType is undefined for the annotation type Column


... so what can I do ? Is it a bug ? Must I do some tricks to make it works ?


Thanks for your help,
Mathias Kluba.