When using the GeneratedValue annotation, Hibernate is generating a null ID.
Why is this??
I have a simple 'Artist' class with an id marked as such:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name="ID")
private Long id;
INFO - Hibernate EntityManager 3.2.0.CR2
INFO - Hibernate Annotations 3.2.0.CR2
INFO - Hibernate 3.2 cr4
Running a simple test:
tx.begin();
manager.persist(artist);
tx.commit();
Gives a null for the GeneratedID:
Hibernate: insert into ARTIST (ID, name, CGR_ID) values (null, ?, ?)
|