I'm trying to insert a new row into a MySql table, which has an 
autoincrement primary key called id.  I want to insert the row, and then 
get the newly created id:

final ImagesRecord record = create.insertInto(Tables.IMAGES)

   .set(Images.RESIZED_URL, resizedUrl).set(Images.ORIGINAL_URL, 
pi.original.sourceUrl.toString()).set(Images.WIDTH, 
pi.processed.getWidth()).set(Images
.HEIGHT, pi.processed.getHeight()).returning(Images.ID).fetchOne();

System.out.println(record.getValue(Images.ID));

This prints "null" and no new record is created in the database, even 
though no errors are reported...

Any ideas?

Ian.

Reply via email to