openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicolas13 <>
Subject Re: Cannot get primary key value (mysql)
Date Thu, 12 Aug 2010 14:42:14 GMT

>I'm going to ask the obvious.... 
as you guessed, i'm a newbe... your question is legitimate :-)

>but is the id column in your db named idMigration?

The strange thing (to me, i guess there must be a obvious reason i'm failing
to understand) is that if i put the @Id annotation on another field of my
entity, specifying the column like that:
private int id;
private int idMigration;

it works as i expected: idMigration is loaded like a regular column.

Is there any reason why i my primary key is not loaded like the other

thanks for you help.

>Another thing, I see you are using @GeneratedValue(strategy=
>GenerationType.AUTO) for your id... but I assume you want to use the MySQL
>AUTO_INCREMENT function? If so, change GenerationType.AUTO to
Ok, thanks for the advice.

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message