I'm setting up a table/entity to auto-generate int values in the first column of a table which will most likely just be the primary key for now in Eclipse with MySQL. It looks like I have it set up correctly with:
@Entity
@Table(name="Table")
public class Table implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(unique=true, nullable=false)
private int id;
It's connecting to the database fine and actually persisting values to the non ID part. The problem is that it's not generating anything for the id. The mysql has a default value of '0' that it's placing in the id column. I'm not getting any errors it just fills the column with '0'.