OK, the problem is that the entity class, which was generated from the existing derby database using NetBeans, did not have the correct annotation for a generated primary key: that is
SQL column definition:
id int not null generated always as primary key
should result in:
@ID
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name='ID',nullable=false)
private Integer id;
but NetBeans left out the @GeneratedValue annotation
Thank you, everyone
[Message sent by forum member 'bclyon' (bclyon)]
http://forums.java.net/jive/thread.jspa?messageID=259977